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

Import Error Iterable from Collections #9

Open
JonnyAlpha opened this issue Dec 27, 2023 · 0 comments
Open

Import Error Iterable from Collections #9

JonnyAlpha opened this issue Dec 27, 2023 · 0 comments

Comments

@JonnyAlpha
Copy link

Hi,

Whenever trying to run the main script either from the main LIHQ ror using the first example, I get the following import error:
Searching for answer, it would appear that Iterables has been removed from collections in Python.

/content/LIHQ
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-14-ee2446352053>](https://localhost:8080/#) in <cell line: 2>()
      1 get_ipython().run_line_magic('cd', '/content/LIHQ')
----> 2 from runLIHQ import run
      3 
      4 run(face='/content/LIHQ/input/face/examples/2372448.png')

2 frames
[/content/LIHQ/QVI/utils/config.py](https://localhost:8080/#) in <module>
      2 import sys
      3 from argparse import ArgumentParser
----> 4 from collections import Iterable
      5 from importlib import import_module
      6 from easydict import EasyDict as edict

ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

To fix this, apparently you can modify the code to read:

from collections.abc import Iterable

However I am unsure how to do this is a pre written colab script?

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

1 participant