-
Notifications
You must be signed in to change notification settings - Fork 221
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
ciscoconfparse.py doesn't import under Python3.7.0 #117
Comments
|
What platform? (Windows 10, Linux, Solaris, etc...) Windows 10 Traceback (most recent call last):
SyntaxError: invalid syntax |
i am receiving the same error error:
SyntaxError: invalid syntax |
i just confirmed it is happening with all lines which are split using the "\". |
for example in ccp_util.py:
if i change to a single line as follows, the error goes away: |
Python 3.7 is not tested or supported right now; I can confirm that something changed about Python3.7, but I don't know what yet. I also confirmed that I can "pip3.exe install -U ciscoconfparse" and there is no issue with Python3.6 under Windows. Please download Python3.6.x from python.org: |
It is working fine with Python 3.6.x. Thank you. |
Perhaps this should be mentioned in the README, which currently states in two places that Python 3.2+ is supported. |
I am seeing the same issue under a fresh install of Python 3.7.0, under Windows 10 x64; ciscoconfparse was installed using pip. It seems that during download, something (pip?) adds a new, empty, line after every single line of code in the .py files (the sshot in the original issue report shows this very nicely). While this is not a problem for most lines, it does cause errors on lines that were split using ''. I have managed to fix this manually by removing the empty lines in the ciscoconfparse files (in lib\site-packages\ciscoconfparse). Amazingly, not all of the files have been affected. Some of them (like protocol_values.py, or models_asa.py) were OK. Others, however (ciscoconfparse.py, models_cisco.py, models_nxos.py, ccp_abc.py, ccp_util.py, etc) were exhibiting the issue. |
I just downloaded Python3.7.1 on x64 (Windows 10), then ran pip3 install -U ciscoconfparse. I had no problems with 3.7.1. Please note: Before I installed 3.7.1, I completely uninstalled and deleted the original Python 3.7.0 windows directory. In my case, Python3.7 was installed in "C:\Users\mpenning\AppData\Local\Programs\Python\Python37". Please try uninstalling Python 3.7.0, delete the residual directories, then reinstall with Python 3.7.1. |
Fresh installation did not work for me. Removing "/" from couple of files worked for me I tried 3.7.0, 3.7.1, 3.7.2 |
@mpenning |
Getting error invalid syntax for this line while executing the code.
The text was updated successfully, but these errors were encountered: