Git Product home page Git Product logo

push_clients_wizard's People

Contributors

nodeping avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

oneofakind1967

push_clients_wizard's Issues

Import error from PyInquirer due to too old prompt_toolkit or too new Python version (3.11)

Hi! I'm trying to use this wizard client on our Arch Linux servers which runs latest Python (3.11) and generally latest dependencies possible, but the tool appears to be dependent on an older Python version or an older library.

After installing PyInquirer and paramiko and running the script, I get this import error:

Traceback (most recent call last):
  File "/usr/local/src/PUSH_Clients_Wizard/app.py", line 7, in <module>
    from modules import _utils, manage_checks
  File "/usr/local/src/PUSH_Clients_Wizard/modules/_utils.py", line 9, in <module>
    from PyInquirer import prompt, Validator, ValidationError
  File "/root/.local/lib/python3.11/site-packages/PyInquirer/__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
  File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
    from .interface import CommandLineInterface
  File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/interface.py", line 19, in <module>
    from .application import Application, AbortAction
  File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/application.py", line 8, in <module>
    from .key_binding.bindings.basic import load_basic_bindings
  File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
    from prompt_toolkit.renderer import HeightIsUnknownError
  File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
    from prompt_toolkit.styles import Style
  File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
    from .from_dict import *
  File "/root/.local/lib/python3.11/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.11/collections/__init__.py)

A quick Google search shows people saying that their script simply needs to be updated (I'm guessing prompt_toolkit), or downgrade Python version: https://stackoverflow.com/a/70557518

I figured I could just update prompt_toolkit but this introduces another import issue:

Traceback (most recent call last):
  File "/usr/local/src/PUSH_Clients_Wizard/app.py", line 7, in <module>
    from modules import _utils, manage_checks
  File "/usr/local/src/PUSH_Clients_Wizard/modules/_utils.py", line 9, in <module>
    from PyInquirer import prompt, Validator, ValidationError
  File "/root/.local/lib/python3.11/site-packages/PyInquirer/__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3.11/site-packages/prompt_toolkit/token.py)

So in short, the tool needs to be updated to support newer Python versions which also includes updating the dependencies.

Python -V for ref:

python -V
Python 3.11.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.