numat / alicat

Python driver and command line tool for Alicat mass flow controllers.
GNU General Public License v2.0
21 stars 27 forks source link

ARMv7l: error on start #10

Closed lemmarathon closed 5 years ago

lemmarathon commented 5 years ago

On a Raspberry Pi 3 B+, alicat fails to run with both Python 2.7.15 and 3.7.1.

Traceback (most recent call last):
  File "/home/alarm/.local/bin/alicat", line 10, in <module>
    sys.exit(command_line())
  File "/home/alarm/.local/lib/python2.7/site-packages/alicat/__init__.py", line 47, in command_line
    command_line(args)
  File "/home/alarm/.local/lib/python2.7/site-packages/alicat/serial.py", line 345, in command_line
    flow_controller = FlowController(port=args.port, address=args.address)
  File "/home/alarm/.local/lib/python2.7/site-packages/alicat/serial.py", line 234, in __init__
    FlowMeter.__init__(self, port, address)
  File "/home/alarm/.local/lib/python2.7/site-packages/alicat/serial.py", line 40, in __init__
    self.connection = serial.Serial(port, 19200, timeout=1.0)
AttributeError: 'module' object has no attribute 'Serial'
Traceback (most recent call last):
  File "/home/alarm/.local/bin/alicat", line 6, in <module>
    from alicat import command_line
  File "/home/alarm/.local/lib/python3.7/site-packages/alicat/__init__.py", line 44
    from alicat.async import command_line
                    ^
SyntaxError: invalid syntax
patrickfuller commented 5 years ago

Alicat should run on both. The top error looks like something with pyserial, and the bottom error is due to the fact 3.7 reserved async as a keyword (this is something that should be fixed in this code).

If you try on 3.6, there's no keyword reservation.

lemmarathon commented 5 years ago

Thanks, I submitted PR #11 to fix the issue on 3.7.