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

Does speedparser compatible with python 3.7? #18

Open
XCanG opened this issue Jan 15, 2019 · 3 comments
Open

Does speedparser compatible with python 3.7? #18

XCanG opened this issue Jan 15, 2019 · 3 comments

Comments

@XCanG
Copy link

XCanG commented Jan 15, 2019

I get import error while trying it importing:

>>> import speedparser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python\Python37\lib\site-packages\speedparser\__init__.py", line 1, in <module>
    from speedparser import parse
ImportError: cannot import name 'parse' from 'speedparser' (C:\Python\Python37\lib\site-packages\speedparser\__init__.py)

I've checked __init__.py and if change first line to from .speedparser import parse it will fix import error, however later it throw another error:

>>> import speedparser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python\Python37\lib\site-packages\speedparser\__init__.py", line 1, in <module>
    from .speedparser import parse
  File "C:\Python\Python37\lib\site-packages\speedparser\speedparser.py", line 19, in <module>
    import urlparse
ModuleNotFoundError: No module named 'urlparse'

And it's look like it python 2 module, at least there a few libraries:
https://pypi.org/project/urlparse2/
https://pypi.org/project/urlparse3/
https://pypi.org/project/urlparse4/
but all of them only for python 2.

@tedder
Copy link
Contributor

tedder commented May 7, 2019

My PR (#16) hasn't been accepted after almost 3 years, but it patches this issue. Just put this in your requirements.txt (or pass to pip3 install) instead of "speedparser".

https://github.com/tedder/speedparser/archive/master.zip

You can literally put that URL in.

@tedder
Copy link
Contributor

tedder commented May 7, 2019

See also #13.

@XCanG
Copy link
Author

XCanG commented May 8, 2019

Yes, it works.

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