Skip to content

Conversation

@migillett
Copy link
Contributor

in response to error code: pubsub.core.topicargspec.SenderUnknownMsgDataError: Some optional args unknown in call to sendMessage('('meshtastic', 'receive')', packet,interface): interface.

Full stack trace:

Traceback (most recent call last):
  File "\GitHub Projects\Meshtastic-Listener\venv\Lib\site-packages\meshtastic\util.py", line 309, in _run
    o()
    ~^^
  File "\GitHub Projects\Meshtastic-Listener\venv\Lib\site-packages\meshtastic\mesh_interface.py", line 1541, in <lambda>
    lambda: pub.sendMessage(topic, packet=asDict, interface=self)
            ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\GitHub Projects\Meshtastic-Listener\venv\Lib\site-packages\pubsub\core\publisher.py", line 216, in sendMessage
    topicObj.publish(**msgData)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "\GitHub Projects\Meshtastic-Listener\venv\Lib\site-packages\pubsub\core\topicobj.py", line 433, in publish
    self._getListenerSpec().check(msgData)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "\Meshtastic-Listener\venv\Lib\site-packages\pubsub\core\topicargspec.py", line 229, in check
    raise SenderUnknownMsgDataError(self.topicNameTuple,
                                    list(msgData.keys()), optional - set(self.allOptional))
pubsub.core.topicargspec.SenderUnknownMsgDataError: Some optional args unknown in call to sendMessage('('meshtastic', 'receive')', packet,interface): interface

pubsub.core.topicargspec.SenderUnknownMsgDataError: Some optional args unknown in call to sendMessage('('meshtastic', 'receive')', packet,interface): interface
@codecov
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.42%. Comparing base (fc3b81d) to head (26c89ea).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #733      +/-   ##
==========================================
+ Coverage   60.35%   60.42%   +0.07%     
==========================================
  Files          24       24              
  Lines        3970     3970              
==========================================
+ Hits         2396     2399       +3     
+ Misses       1574     1571       -3     
Flag Coverage Δ
unittests 60.42% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ianmcorvidae
Copy link
Contributor

this is inappropriate; the interface is intended to be passed to the pubsub functions, in part so it can be used to distinguish among multiple interfaces that may be used simultaneously.

the correct fix here is in code using this library, which should have an interface argument for their callback functions

@migillett migillett deleted the bug/sender-unknown-pubsub branch February 1, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants