Skip to content

[bug]: invokeai-import-images throws a TypeError #6776

@SkyrimLL

Description

@SkyrimLL

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

RTX3090

GPU VRAM

24GB

Version number

4.2.8

Browser

Chrome (up to date)

Python dependencies

No response

What happened

I am trying to run invokeai-import-images to consolidate multiple image folders from old versions of Invoke into one instance and database.
Running the command in the developer console results in this error message:

Python version is:
Python 3.10.9
*************************
You are now in the system shell, with the local InvokeAI Python virtual environment activated,
so that you can troubleshoot this InvokeAI installation as necessary.
*************************
*** Type `exit` to quit this shell and deactivate the Python virtual environment ***
(.venv) E:\Tools\Invoke>invokeai-import-images
===============================================================================
This script will import images generated by earlier versions of
InvokeAI into the currently installed root directory:
   E:\Tools\Invoke
If this is not what you want to do, type ctrl-C now to cancel.
===============================================================================
= Configuration & Settings
Traceback (most recent call last):
  File "C:\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "E:\Tools\Invoke\.venv\Scripts\invokeai-import-images.exe\__main__.py", line 7, in <module>
  File "E:\Tools\Invoke\.venv\lib\site-packages\invokeai\frontend\install\import_images.py", line 780, in main
    processor.process()
  File "E:\Tools\Invoke\.venv\lib\site-packages\invokeai\frontend\install\import_images.py", line 698, in process
    config.find_and_load()
  File "E:\Tools\Invoke\.venv\lib\site-packages\invokeai\frontend\install\import_images.py", line 65, in find_and_load
    if not self.confirm_and_load(os.path.abspath(root)):
  File "E:\Tools\Invoke\.venv\lib\site-packages\invokeai\frontend\install\import_images.py", line 77, in confirm_and_load
    if os.path.isabs(db_dir):
  File "C:\Python\Python310\lib\ntpath.py", line 89, in isabs
    s = os.fspath(s)
TypeError: expected str, bytes or os.PathLike object, not NoneType

(.venv) E:\Tools\Invoke>

What you expected to happen

I expected the script to run as described on this page: https://invoke-ai.github.io/InvokeAI/features/UTILITIES/

How to reproduce the problem

Start invoke.bat
Select option 2. Open the developer console
Enter 'invokeai-import-images'

Additional context

No response

Discord username

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions