zMoooooritz / stapy

An easy to use SensorThings API Client written in Python
MIT License
6 stars 2 forks source link

inquirer issue python 3.10 #44

Open rduivenvoorde opened 1 year ago

rduivenvoorde commented 1 year ago

Thanks for creating/packaging/idea!

Thought to test it on my Debian desktop (python 3.10) but got:

$ stapy -u http://localhost:8080/v1.0
/home/richard/venv/lib/python3.10/site-packages/thefuzz/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
Traceback (most recent call last):
  File "/home/richard/venv/bin/stapy", line 5, in <module>
    from stapy.cli.main import main
  File "/home/richard/venv/lib/python3.10/site-packages/stapy/cli/main.py", line 3, in <module>
    from stapy.cli.parser import Parser
  File "/home/richard/venv/lib/python3.10/site-packages/stapy/cli/parser.py", line 10, in <module>
    from stapy.cli.cli import CLI
  File "/home/richard/venv/lib/python3.10/site-packages/stapy/cli/cli.py", line 1, in <module>
    from PyInquirer import prompt
  File "/home/richard/venv/lib/python3.10/site-packages/PyInquirer/__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
    from .interface import CommandLineInterface
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/interface.py", line 19, in <module>
    from .application import Application, AbortAction
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/application.py", line 8, in <module>
    from .key_binding.bindings.basic import load_basic_bindings
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
    from prompt_toolkit.renderer import HeightIsUnknownError
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
    from prompt_toolkit.styles import Style
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
    from .from_dict import *
  File "/home/richard/venv/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

Tried to update 'inquirer' to latest version... but that dit not help yet...

rduivenvoorde commented 1 year ago

Mmm, the requirements.txt says to install 'inquirer', but 'PyInquirer' is imported (in cli.py).

Maybe a mixup of the two projects?

https://github.com/CITGuru/PyInquirer/tree/master/PyInquirer

and

https://github.com/magmax/python-inquirer/tree/master/src/inquirer ?

The last one seems to be most 'alive'?

zMoooooritz commented 1 year ago

Some time ago I moved this project from using PyInquirer to inquirer since the former got abandoned.

Unfortunately I can't confirm the wrong import you stated, in the current master branch as well as the last shipped version v0.3.0 there is the import line from inquirer import prompt in cli.py

When did you pull / download the project? Maybe this was before the change from PyInquirer to inquirer and therefore you see these errors.