jshridha / anovamaster

BSD 2-Clause "Simplified" License
5 stars 5 forks source link

Python3 issues #7

Closed lolouk44 closed 4 years ago

lolouk44 commented 4 years ago

Hi Jay,

Looking at python3 now. did this on a fresh git clone (with a copy of my config):

  $ virtualenv venv
  $ . venv/bin/activate
  $ pip3 install -r requirements.txt
  $ python3 run.py

and I get this error:

Traceback (most recent call last):
  File "run.py", line 29, in <module>
    main()
  File "run.py", line 14, in main
    my_anova = AnovaMaster(config)
  File "/home/cctv/Anova/anova_old/anovamaster/AnovaMaster/AnovaMaster.py", line 32, in __init__
    self._anova = RESTAnovaController(self._config.get('anova', 'mac'), connect = False)
  File "/home/cctv/Anova/anova_old/anovamaster/AnovaMaster/RESTAnovaController.py", line 24, in __init__
    super(RESTAnovaController, self).__init__(mac_address, connect=connect)
TypeError: __init__() got an unexpected keyword argument 'connect'
jshridha commented 4 years ago

Which version of python3 are you on? It's working for me on python 3.7.3

jshridha commented 4 years ago

Also, which version of pycirculate are you using? You'll need the version on master here: https://github.com/CY8s/pycirculate

lolouk44 commented 4 years ago

Thanks. Python 3.7.7 and pycirculate-0.1.1a1

jshridha commented 4 years ago

Really strange. Looking through the source code for pycirculate, connect is definitely an argument. Can you load up a python shell, import pycirculate, and make sure the path it references has the connect argument?

Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycirculate
>>> pycirculate
<module 'pycirculate' from '/home/pi/git/anovamaster/.venv/lib/python3.7/site-packages/pycirculate/__init__.py'>
lolouk44 commented 4 years ago

Oh you found it. For some reason I did not have the same code as in the repo. Overwritten and it works. I guess I need to stop messing about with my system, hence the driving to create a docker version of your code 😆 I'll start working on a docker container that uses python3. In the meantime let me know if the current container works for you. Thanks