question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An argument is missing in the 'outgoing' function of the class Protocol.

See original GitHub issue

Description In ROS1 in version 0.11.15 a bug has been introduced. I was working with rosbridge via TCP and I got the following traceback in the terminal:

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/opt/ros/noetic/lib/python3/dist-packages/rosbridge_library/internal/services.py", line 78, in run
    self.error(e)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosbridge_library/capabilities/call_service.py", line 116, in _failure
    self.protocol.send(outgoing_message)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosbridge_library/protocol.py", line 277, in send
    self.outgoing(serialized, compression)
TypeError: send_message() takes from 1 to 2 positional arguments but 3 were given

Looking at the code I have seen that the outgoing() function working with websocket accepts a new parameter named compression. But in TCP it doesn’t work because the outgoing function is not overridden. Consequently the error shown above appears, because the base function does not accept that argument.

I have seen that in the classes RosbridgeTcpSocket, RosbridgeUdpSocket and RosbridgeWebSocket there is an assignment where self.protocol.outgoing = self.send_message and in the 3 definitions of the send_message function the compression argument is never given.

  • Library Version: 0.11.15
  • ROS Version: Noetic
  • Platform / OS: Ubuntu 20.04

Steps To Reproduce Just establish a TCP connection and start transmission.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ribes4commented, Oct 18, 2022

@achim-k Tested and works correctly in a TCP transmission. Thanks for the quick response.

1reaction
achim-kcommented, Oct 17, 2022

@ribes4 could you confirm that #812 fixes the issue? I tested it locally but it would be great if you could test it as well. I didn’t add a unit test as it seemed to much work and on ros2 rosbridge_server does not provide UDP/TCP support anymore.

Will create a new release, which should land in noetic with the next sync expected to be early november.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Factory missing positional argument - python - Stack Overflow
The protocol creates a new LoopingCall instance that will write a single asterisk to the protocol's transport as the connection is ...
Read more >
Transports and Protocols — Python 3.11.1 documentation
Transports are classes provided by asyncio in order to abstract various kinds of communication channels. Transport objects are always instantiated by an asyncio ......
Read more >
Xcode 14 Release Notes | Apple Developer Documentation
Workaround: Run xcodebuild -runFirstLaunch , or launch Xcode.app first. Xcode can sometimes consider the platform sim runtime missing when performing a user Log ......
Read more >
Writing Snort Rules
There are three IP protocols that Snort currently analyzes for suspicious behavior, ... A CIDR block mask of /24 indicates a Class C...
Read more >
RFC 3550: RTP: A Transport Protocol for Real-Time Applications
RTP provides end-to-end network transport functions suitable for applications ... RFC 3550 RTP July 2003 was combined to produce the outgoing packet, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found