-
Notifications
You must be signed in to change notification settings - Fork 50
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
pysunspec for python 3.6 #53
Comments
I believe the Python 3 branch was merged. Would you mind showing what errors you were getting? |
i have the latest version of python (3.6) . The errors i get is as under. It would of great help if you could have a look. C:\Users\user\Documents\python\pysunspec-master\pysunspec-master>python setup.py install C:\Users\user\Documents\python\pysunspec-master\pysunspec-master>python -m unittest discover -v sunspec ======================================================================
|
Well the good news is that none of those appear to be Python 3 issues. It looks like you're running into two issues.
Please let us know if you're having trouble with the installation instructions in the readme so that we can improve it. |
Thankyou so much for your support.That sounds great that its not a Python 3 issue :) Actually to be sure that i understand the documentation right, i tried pysunspec with python 2 and was successful in testing the unittest discover command really fast. I didnt have to make any changes at all. Python3 Issue : i have Python 3.6 installed. As mentioned in the documentation, i downloaded and succesfully installed the lastet version of pyserial(3.4 ). For the latest version of pysunspec (Release 1.0.8) i downloaded it from https://github.com/sunspec/pysunspec/releases/ Now when i try to install pysunspec i get errors as shown below. Being new to Python i am sure that it could be a mistake i cannot track. C:\Project\Python\py3\py -3 setup.py install > install.txt 2>&1 running install test_modbus_client.cpython-36.pyc test_modbus_mbmap.cpython-36.pyc File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\device.py", line 119 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\modbus\client.py", line 119 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\modbus\mbmap.py", line 108 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\smdx.py", line 129 Sorry: TabError: inconsistent use of tabs and spaces in indentation (serial.py, line 62) File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_client.py", line 44 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_data.py", line 48 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_device.py", line 307 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_modbus_client.py", line 31 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_modbus_mbmap.py", line 60 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\util.py", line 226 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\models\smdx\manifest.py", line 89 |
All lines handling exceptions need to be changend for usage with python 3 |
Hi Heiner, Thanks |
As I mentioned in my last comment To get the .zip from the master branch go to the main page and click the clone or download button and there will be an option to download the .zip |
Thankyou for helping me out with this. i did the following steps. please correct me if something was wrong Step 1 : download (sunspec/pysunspec) zip file from the Master branch (https://github.com/sunspec/pysunspec) And then i get the Install errors : running install File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_client.py", line 46 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\core\test\test_data.py", line 51 Sorry: TabError: inconsistent use of tabs and spaces in indentation (test_device.py, line 311) File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\sunspec\models\smdx\manifest.py", line 140 |
Thank you for the help . Atlast got it working. For begineers like me : Please use the pysunspec from the feature branch https://github.com/sunspec/pysunspec/tree/feature-py2-3 Add the Model description from https://github.com/sunspec/models and copy the smdx folder to pysunspec in '/pysunspec-feature-py2-3/sunspec/models' Thank you for all the guidence. |
I guess this can be closed? Though the |
Also #60 is still open. If py3 support is wanted in the mean time https://github.com/altendky/pysunspec works. Note the extra info at the beginning of the README. |
hi
i try to test the installation with Python3.6 using python -m unittest discover -v sunspec and get errors
Ran 40 tests in 0.046s
FAILED (errors=14)
Does pysunspec support Python3 already ?
Thanks
The text was updated successfully, but these errors were encountered: