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

Bug: AttributeError: module 'collections' has no attribute 'Callable' #1157

Open
mime-r opened this issue Dec 31, 2023 · 3 comments · May be fixed by #1229
Open

Bug: AttributeError: module 'collections' has no attribute 'Callable' #1157

mime-r opened this issue Dec 31, 2023 · 3 comments · May be fixed by #1229

Comments

@mime-r
Copy link

mime-r commented Dec 31, 2023

Error message:

...
File "C:\Users\...\Jarvis\env\lib\site-packages\pyreadline\py3k_compat.py", line 8, in callable
    return isinstance(x, collections.Callable)
AttributeError: module 'collections' has no attribute 'Callable'

How to reproduce:

  1. Clone from the main branch.
  2. Run the command python installer
  3. Run the command ./jarvis

Expected behaviour:

No AttributeError.

Machine details:

Windows 10 Pro, Running commands from Powershell within VSCode.

Proposed Fix:

collections.Callable has been moved to collections.abc.Callable

Due to using depreciated functions.

@mime-r
Copy link
Author

mime-r commented Dec 31, 2023

I know how to fix it, so I assign it to myself lol.

@mime-r
Copy link
Author

mime-r commented Dec 31, 2023

Nevermind, realised that the problem lies in the code for the pyreadline module itself created in the 'env' folder during installation, hence it can't be 'fixed'. If there is a workaround, please let me know.

@Jacobloon
Copy link

This issue is a bit old, but I found a Python 3 compatible version of pyreadline at https://github.com/pyreadline3/pyreadline3 that fixes the collections.Callable problem. I have a fork that replaces the deprecated version with the newer one and replaces the outdated import in imgur.py.

@Jacobloon Jacobloon linked a pull request Dec 20, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants