-
Notifications
You must be signed in to change notification settings - Fork 125
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
/lib/feedparser/sgmllib3.py contains invalid syntax #343
Comments
Any details on the system?! There is no need to compile anything... |
doing it later only shows problems later |
If you cannot post details about your setup I cannot help you. What python version are you using? What OS? |
I am continuing this as i am having the same problem. Tested using Gentoo Linux And Ubuntu Linux. Versions of python tried. 2.7.6 2.7.7. 2.7.8. It is easy to recreate. Just issue command "python2 sgmllib3.py" will output: File "sgmllib3.py", line 484 Having dug a bit deeper (I am not python expert) I can see that the supplied sgmllib.py which i have in /usr/lib64/python2.7/sgmllib.py does not use the same code around line 484. Is the included (in marachino) version by any chance for python3 as it does run fine with the same command using python 3.x? |
Nope, it is definitely for python 2.6+ maybe even 2+. I have personally never touched python 3 so I have no idea what the changes are. How are you running maraschino? I have run it successfully and easily on Ubuntu several times so I am pretty sure the default python version that comes with it works out of the box. |
This has nothing to do with how maraschino is run. I could very well imagine that it is running nicely. It is just the SyntaxError message when one tries to run sgmllib3.py. Could you please try if you can run it manually without syntax error? |
Unsure of what you want me to run and why. Please clarify. |
I could only see this being a problem when compiling an exe. It looks like the file is not being used by the lib anyways and could be removed. (untested tho) |
@gugahoi I would like you to navigate to maraschino/lib/feedparser and issue command "python2 sgmllib3.py" Reason is to verify/deverify that the command has issues. At least when running sgmllib directly. According to documentation (for sgmllib) it can be run in manual mode. I am not saying in any way that there is a issue with maraschino itself. As said previously i am no python coder so it is out of my scope to see what sgmllib actually is used for. I am just curious to why it will not run directly when the version supplied with 2.7 actually does. If bored there is a thread here about the issue: http://stackoverflow.com/questions/2456148/python-print-end. That thread makes me think that the included sgmllib3.py is for python3 and not python2 as print('start tag: <' + tag, end=' ') is apparently not compatible with python 2.x. @N3MIS15 I may just try that. I could also create a diff changing the lines around 484 back according to the sgmllib.py included with python 2.x which does run manual. But have no clue if anything will explode. |
Oh ok, I see what you mean. That kind of print statement is definitely not compatible with python 2 and I do get an error when trying to run it. |
Compiling /usr/share/maraschino/lib/feedparser/sgmllib3.py ...
File "/usr/share/maraschino/lib/feedparser/sgmllib3.py", line 484
print('start tag: <' + tag, end=' ')
^
SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered: