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

Import fails on Python3.5 #32

Closed
gnunicorn opened this issue Nov 11, 2015 · 6 comments
Closed

Import fails on Python3.5 #32

gnunicorn opened this issue Nov 11, 2015 · 6 comments

Comments

@gnunicorn
Copy link

It appears something is seriously broken when trying to install lassie with Python 3.5. Install goes fine but when importing I get here:

Python 3.5.0 (default, Sep 23 2015, 04:41:38)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lassie
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ben/dev/beavy/venv/src/lassie/lassie/__init__.py", line 19, in <module>
    from .api import fetch
  File "/Users/ben/dev/beavy/venv/src/lassie/lassie/api.py", line 11, in <module>
    from .core import Lassie
  File "/Users/ben/dev/beavy/venv/src/lassie/lassie/core.py", line 13, in <module>
    from bs4 import BeautifulSoup
  File "/Users/ben/dev/beavy/venv/lib/python3.5/site-packages/bs4/__init__.py", line 30, in <module>
    from .builder import builder_registry, ParserRejectedMarkup
  File "/Users/ben/dev/beavy/venv/lib/python3.5/site-packages/bs4/builder/__init__.py", line 308, in <module>
    from . import _htmlparser
  File "/Users/ben/dev/beavy/venv/lib/python3.5/site-packages/bs4/builder/_htmlparser.py", line 7, in <module>
    from html.parser import (
ImportError: cannot import name 'HTMLParseError'
@gnunicorn
Copy link
Author

It appears this also caused by a broken dependency. With the latest version of Beautiful soup (4.4.1), the import works fine. Guess someone forgot to update dependencies here...

@michaelhelmick
Copy link
Owner

Yeah, I'm not a Python 3.x user full-time yet, and Travis doesn't test against 3.5.

We'll want to do two things:

  • Add Python 3.5 to the python test matrix
  • Update BeautifulSoup4 requirement to 4.4.1

@michaelhelmick
Copy link
Owner

I tested updating the dependency and confirm it works.

@gnunicorn
Copy link
Author

Doing a PR for both of this now.

@gnunicorn
Copy link
Author

PR pending.

michaelhelmick added a commit that referenced this issue Nov 11, 2015
Update bs4 dependencies, fixes python3 bug #32
@michaelhelmick
Copy link
Owner

@ligthyear 0.6.2 is officially released. Thanks!

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