CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 236 forks source link

ImportError: cannot import name 'style_from_dict' from 'PyInquirer' #92

Closed philipbergen closed 4 years ago

philipbergen commented 4 years ago

Like #1 this is now back again, though slightly different token:

ImportError while importing test module '/Users/pbergen/code/PyInquirer/tests/test_helpers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_helpers.py:5: in <module>
    from .helpers import remove_ansi_escape_sequences
tests/helpers.py:23: in <module>
    from PyInquirer import style_from_dict, Token
E   ImportError: cannot import name 'style_from_dict' from 'PyInquirer' (/Users/pbergen/code/PyInquirer/PyInquirer/__init__.py)

The requirements say prompt_toolkit>=1.0.16,<1.1, but that appears to be insufficient. Tried with 1.0.16, 1.0.17, and 1.0.18. They all fail.

Running on macOS catalina, with python3 from latest xcode.

philipbergen commented 4 years ago

The problem comes from: https://github.com/CITGuru/PyInquirer/commit/8882991430348610d7605f7d2ed236d31e29056e

SonGokussj4 commented 4 years ago

When I uncommented those 3 lines back, it works. But I have an automated environment so it's installing from PyPI. Is there a way you will update your project to a newer version?

adrabarek commented 4 years ago

This looks like an unintentional change. Fixed in PR #115 (containing @philipbergen PR #93)

CITGuru commented 4 years ago

This has been fixed. Closing this