Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic client install fails #165

Closed
kjeldflarup opened this issue Dec 4, 2017 · 1 comment
Closed

Basic client install fails #165

kjeldflarup opened this issue Dec 4, 2017 · 1 comment

Comments

@kjeldflarup
Copy link
Contributor

kjeldflarup commented Dec 4, 2017

This instruction failed https://labgrid.readthedocs.io/en/latest/getting_started.html

sudo apt-get install python3 python3-virtualenv python3-pip
sudo apt install virtualenv
virtualenv -p python3 labgrid-venv
source labgrid-venv/bin/activate
pip3 install labgrid
labgrid-client --help
Traceback (most recent call last):
  File "/home/kfa/labgrid-venv/bin/labgrid-client", line 7, in <module>
    from labgrid.remote.client import main
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/labgrid/__init__.py", line 1, in <module>
    from .target import Target
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/labgrid/target.py", line 6, in <module>
    from .driver import Driver
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/labgrid/driver/__init__.py", line 3, in <module>
    from .serialdriver import SerialDriver
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/labgrid/driver/serialdriver.py", line 10, in <module>
    from ..resource import SerialPort, NetworkSerialPort
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/labgrid/resource/__init__.py", line 7, in <module>
    from .udev import USBSerialPort
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/labgrid/resource/udev.py", line 148, in <module>
    class USBSerialPort(SerialPort, USBResource):
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/attr/_make.py", line 644, in attrs
    return wrap(maybe_cls)
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/attr/_make.py", line 613, in wrap
    builder = _ClassBuilder(cls, these, slots, frozen, auto_attribs)
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/attr/_make.py", line 345, in __init__
    attrs, super_attrs = _transform_attrs(cls, these, auto_attribs)
  File "/home/kfa/labgrid-venv/lib/python3.5/site-packages/attr/_make.py", line 311, in _transform_attrs
    .format(a=a)
ValueError: No mandatory attributes allowed after an attribute with a default value or factory.  Attribute in question: Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, convert=None, metadata=mappingproxy({}), type=None)

I have no idea what this error says.

This alternative though succeed, and after running this the error goes away in the virtualenv

$ git clone https://github.com/labgrid-project/labgrid
$ cd labgrid && python3 setup.py install
@jluebbe
Copy link
Member

jluebbe commented Dec 4, 2017

"No mandatory attributes allowed after an attribute ..." was caused by a change in the attrs python module. The labgrid release on pypi (which you installed via pip) is incompatible with that. So using the master branch from git is correct.

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

No branches or pull requests

2 participants