InvokeAI: [bug]: Docker container won't launch "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
Is there an existing issue for this?
- I have searched the existing issues
OS
Linux
GPU
cuda
VRAM
No response
What version did you experience this issue on?
main-cuda e53e970544c2bb92c081475ce1f170946256c06fc3466095fe5599465711942c
What happened?
Trying to launch invoke AI through TrueNAS Scale.
Looks like the container is using python 3.9, but should be 3.10 for that syntax
2023-06-05T03:13:03.289331921Z Traceback (most recent call last):
2023-06-05T03:13:03.289363150Z File "/usr/src/InvokeAI/bin/invokeai", line 5, in <module>
2023-06-05T03:13:03.289371105Z from invokeai.app.cli_app import invoke_cli
2023-06-05T03:13:03.289375303Z File "/usr/src/InvokeAI/lib/python3.9/site-packages/invokeai/app/cli_app.py", line 17, in <module>
2023-06-05T03:13:03.289398726Z from invokeai.app.services.images import ImageService
2023-06-05T03:13:03.289415728Z File "/usr/src/InvokeAI/lib/python3.9/site-packages/invokeai/app/services/images.py", line 26, in <module>
2023-06-05T03:13:03.289439032Z from invokeai.app.services.image_file_storage import (
2023-06-05T03:13:03.289444352Z File "/usr/src/InvokeAI/lib/python3.9/site-packages/invokeai/app/services/image_file_storage.py", line 79, in <module>
2023-06-05T03:13:03.289473717Z class DiskImageFileStorage(ImageFileStorageBase):
2023-06-05T03:13:03.289480039Z File "/usr/src/InvokeAI/lib/python3.9/site-packages/invokeai/app/services/image_file_storage.py", line 192, in DiskImageFileStorage
2023-06-05T03:13:03.289532017Z def __get_cache(self, image_name: str) -> PILImageType | None:
2023-06-05T03:13:03.289540473Z TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Screenshots
Additional context
No response
Contact Details
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
Sorry about the troubles with the docker image - that’s all broken right now. It will not work with
main
in its current state. We’re working hard on fixing all of that very soon! @fat-tire: perhaps once that’s done, it will be easier for you to re-contribute your Podman PR, if you’re still interested?For the time being, I would highly recommend using an older 2.3.5post2 image. It won’t have all the latest and greatest, but it will at least work.
This commit: https://github.com/invoke-ai/InvokeAI/commit/5bf9891553eb423c0d39539bc66c2ad551f37323 appears to have introduced code that is not compatible with Python 3.9 (It uses the | symbol which was introduced in 3.10)
The default dockerfile is still using python 3.9, so it fails with the above type error on startup.
I also just hit this problem. Will try a couple things and see where I get.
I’ll be retiring the run/build scripts in favour of
docker-compose
, so perhaps addingpodman-compose
alongside it would be most straightforward. I’ll tag you in the PR to get your thoughts, once it’s ready (soon™)Thank you for everyone who looked into this and the information!
I did end up pulling and building 2.3.5post2 locally (with a python 3.10 upgrade for good measure), so do have it working!
I think it would be handy if the images on docker hub could be version tagged, rather than just Sha https://hub.docker.com/r/invokeai/invokeai
That was if someone runs into similar issues in the future they can easily select an older working version, and not get lost in all the development ones