InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug] ModuleNotFoundError: No module named 'picklescan'

Open FilipTrichkov opened this issue 2 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

4GB

What happened?

Hi I installed InvokeAI about a month ago and it was working prefectly fine but since yesterday it's giving me the same error when i try to open Invoke: ModuleNotFoundError: No module named 'picklescan'. The entire error: ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ C:\Users\InvokeAI\scripts\invoke.py:4 in │ │ │ │ 1 #!/usr/bin/env python │ │ 2 │ │ 3 import ldm.invoke.CLI │ │ ❱ 4 ldm.invoke.CLI.main() │ │ 5 │ │ 6 │ │ │ │ c:\users\invokeai\ldm\invoke\CLI.py:54 in main │ │ │ │ 51 │ print(f'>> InvokeAI runtime directory is "{Globals.root}"') │ │ 52 │ │ │ 53 │ # loading here to avoid long delays on startup │ │ ❱ 54 │ from ldm.generate import Generate │ │ 55 │ │ │ 56 │ # these two lines prevent a horrible warning message from appearing │ │ 57 │ # when the frozen CLIP tokenizer is imported │ │ │ │ c:\users\invokeai\ldm\generate.py:39 in │ │ │ │ 36 from ldm.invoke.image_util import InitImageResizer │ │ 37 from ldm.invoke.devices import choose_torch_device, choose_precision │ │ 38 from ldm.invoke.conditioning import get_uc_and_c_and_ec │ │ ❱ 39 from ldm.invoke.model_cache import ModelCache │ │ 40 from ldm.invoke.seamless import configure_model_padding │ │ 41 from ldm.invoke.txt2mask import Txt2Mask, SegmentedGrayscale │ │ 42 from ldm.invoke.concepts_lib import Concepts │ │ │ │ c:\users\invokeai\ldm\invoke\model_cache.py:25 in │ │ │ │ 22 from omegaconf.errors import ConfigAttributeError │ │ 23 from ldm.util import instantiate_from_config, ask_user │ │ 24 from ldm.invoke.globals import Globals │ │ ❱ 25 from picklescan.scanner import scan_file_path │ │ 26 │ │ 27 DEFAULT_MAX_MODELS=2 │ │ 28 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ModuleNotFoundError: No module named 'picklescan'**

I searched everywhere on the internet but I could not find anyone having this issue or a similar one. Can someone please help me? If you have some advice please write it out in a simplifed form because I am not the most familiar with coding and things like that.

Thank you in advance!

Screenshots

No response

Additional context

No response

Contact Details

[email protected]

FilipTrichkov avatar Dec 02 '22 14:12 FilipTrichkov

@FilipTrichkov - If you installed manually, and recently updated, you likely didn't run conda env update in your InvokeAI directory.

hipsterusername avatar Dec 02 '22 15:12 hipsterusername

@FilipTrichkov - If you installed manually, and recently updated, you likely didn't run conda env update in your InvokeAI directory.

Thank you for the response! I tried inputting conda env update in Anaconda but this is what I get when I run it: EnvironmentFileNotFound: 'C:\Users\InvokeAI\environment.yml' file not found

I tried with git pull in Powershell as well and I still get the same error. :(

Do you happen to know how I can proceed?

FilipTrichkov avatar Dec 02 '22 19:12 FilipTrichkov

@FilipTrichkov Did you remember to copy the correct enviroment.yml by using

Macintosh and Linux using a symbolic link:

ln -sf environments-and-requirements/environment-xxx-yyy.yml environment.yml

Replace xxx and yyy with the appropriate OS and GPU codes.

Windows:

copy environments-and-requirements\environment-win-cuda.yml environment.yml

The details are in https://github.com/invoke-ai/InvokeAI/releases/tag/v2.2.3 under Upgrading

Yorzaren avatar Dec 02 '22 21:12 Yorzaren

@Yorzaren Thank you! I followed the instruction in the Upgrading section of https://github.com/invoke-ai/InvokeAI/releases/tag/v2.2.3:

  • I downlaoded the source code and unzipped it
  • I ran 'cd invokeai-2.2.3' and then the command copy environments-and-requirements\environment-win-cuda.yml environment.yml
  • Afterwards I ran conda env update conda activate invokeai python scripts/preload_models.py
  • Then when I try to run python scripts/invoke.py I still get the same 'no module named pickescan' error. :(

Is there anything else you would suggest I should do?

FilipTrichkov avatar Dec 03 '22 14:12 FilipTrichkov

Oh wait, @FilipTrichkov Are you doing the following?

  • Opening Conda: cd invokeai > conda activate invokeai > python scripts/invoke.py

If you do it the above way, it does toss errors.

I think the devs changed it. You have to start it using the invoke.bat

Yorzaren avatar Dec 03 '22 15:12 Yorzaren