alt-key-project / comfyui-dream-project

Animation supporting nodes for ComfyUI
MIT License
76 stars 7 forks source link

ImportError: cannot import name 'MappingProxyType' from partially initialized module 'types' #7

Closed Entaigner closed 9 months ago

Entaigner commented 9 months ago

Python Version: 3.10.6 Problem:

ImportError: cannot import name 'MappingProxyType' from partially initialized module 'types' (most likely due to a circular import)

When: Directly after manually executing the following command in the project folder comfyui-dream-project:

python -m pip install -r requirements.txt

(Manually because the installation via ComfyUI_Manager failed)

I hope that i've not messed up and caused it myself, still fairly new to python.

Solved it by renaming types.py to typess.py

for i in `fgrep -rF 'types' -l --exclude-dir='.git' --exclude-dir='__pycache__'`; do
    sed -ri 's|from \.types|from .typess|g' "$i";
done
mv types.py typess.py

but im sure you've got a better idea, if necessary.

Nice music btw. and thanks for sharing.

alt-key-project commented 9 months ago

Thanks for the bug report! In this case I am not really sure what happened, but I have done a name change of types.py in case that will help with the issue. Other than that I can only suggest that when you run "python -m pip install -r requirements.txt" you ensure that you are using the right python interpreter (depends on how you installed ComfyUI).