Skip to content
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

SyntaxError: invalid syntax #18

Closed
webmedic opened this issue Apr 17, 2015 · 3 comments
Closed

SyntaxError: invalid syntax #18

webmedic opened this issue Apr 17, 2015 · 3 comments

Comments

@webmedic
Copy link

Trying to use this on python3 and I'm getting this?
feedparser.py", line 1353
ur'''(([a-zA-Z0-9_-.+]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([a-zA-Z0-9-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?))(?subject=\S+)?''',
^
SyntaxError: invalid syntax

the error is pointing to the last set of ''' before the comma.

I have played with this for a few hours, spliting up the line turing it into a string, etc, etc and no matter what it doesn't like that line.

Thanks

@kurtmckee
Copy link
Owner

Have you run the code through 2to3 yet? The 'u' in front of the quotes suggests that this hasn't been done yet.

2to3 -w feedparser.py

Also, please upgrade to feedparser 5.2.0. That line is no longer on line 1353. =)

@webmedic
Copy link
Author

yes I did that and now it works.
Of course it would have helped if I would have done that before I spent a
few hours correcting other issues by hand.

Thanks

Brook Humphrey
Energy Management Technician Major
Lane Community College
(541) 600-6074
Email address: webmedic@gmail.com

On Fri, Apr 17, 2015 at 9:17 AM, Kurt McKee notifications@github.com
wrote:

Have you run the code through 2to3 yet? The 'u' in front of the quotes
suggests that this hasn't been done yet.

2to3 -w feedparser.py


Reply to this email directly or view it on GitHub
#18 (comment).

@kurtmckee
Copy link
Owner

I understand the frustration! feedparser development in the near-term is actually going to include making the code run in both Python 2 and Python 3 without running 2to3, so I expect that in a future release this will no longer be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants