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

ImportError: cannot import name indent #1

Closed
iammatthias opened this issue Dec 24, 2016 · 2 comments
Closed

ImportError: cannot import name indent #1

iammatthias opened this issue Dec 24, 2016 · 2 comments

Comments

@iammatthias
Copy link

iammatthias commented Dec 24, 2016

Python 2.7.13
pip 9.0.1

I keep getting this error when I run hps init:

  File "/usr/local/bin/hps", line 11, in <module>
    from hugophotoswipe.ui import main
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/ui.py", line 14, in <module>
    from .hugophotoswipe import HugoPhotoSwipe
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/hugophotoswipe.py", line 14, in <module>
    from .album import Album
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/album.py", line 19, in <module>
    from .photo import Photo
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/photo.py", line 18, in <module>
    from textwrap import wrap, indent
ImportError: cannot import name indent 

If I remove indent from from textwrap import wrap, indent I get this error:

Traceback (most recent call last):
  File "/usr/local/bin/hps", line 12, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/ui.py", line 19, in main
    hps = HugoPhotoSwipe()
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/hugophotoswipe.py", line 24, in __init__
    self._albums = self._load_albums()
  File "/usr/local/lib/python2.7/site-packages/hugophotoswipe/hugophotoswipe.py", line 92, in _load_albums
    local_objects = os.listdir()
TypeError: listdir() takes exactly 1 argument (0 given)
@GjjvdBurg
Copy link
Owner

GjjvdBurg commented Dec 24, 2016 via email

@GjjvdBurg
Copy link
Owner

@iammatthias it should work in Python 2 now as well. Let me know if you encounter any other problems.

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