Skip to content

python 2.7 - TypeError: monotonic() takes no arguments (1 given) #22

Description

@JamesStewy

Hi,

I am trying to use pyuavcan with python 2.7 but I am getting an error upon node initialization. I installed pyuavcan using pip install uavcan and pip install pyserial for SLCAN.

test.py:

#!/usr/bin/python
import uavcan

node_id = 123
node_info = uavcan.protocol.GetNodeInfo.Response()
node_info.name = 'test'
node_info.software_version.major = 1
node_info.hardware_version.unique_id = map(ord,'12345')

node = uavcan.make_node('/dev/ttyACM0', node_id=node_id, node_info=node_info)

Output:

No handlers could be found for logger "uavcan.driver.slcan"
Traceback (most recent call last):
  File "./test.py", line 10, in <module>
    node = uavcan.make_node('/dev/ttyACM0', node_id=node_id, node_info=node_info)
  File "/usr/local/lib/python2.7/dist-packages/uavcan/node.py", line 501, in make_node
    can = driver.make_driver(can_device_name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/uavcan/driver/__init__.py", line 33, in make_driver
    return SLCAN(device_name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/uavcan/driver/slcan.py", line 655, in __init__
    raise sig
TypeError: monotonic() takes no arguments (1 given)

In the README it says

If Python 2.7 is used, additional dependencies are needed - refer to setup.py for more info.

but I can't find any additional information.

I have tried using python 3 and everything works fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions