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

bugfix for import local tools module failed #728

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

jiaqianjing
Copy link
Contributor

I think if you want to import local module (e.g. from toos import my_utils) by modifying sys.path, it's better to replace sys.path.apped() with sys.path.insert(). Because some tools has been exists in sys.path.

Traceback (most recent call last):
  File "/workspace/GPT-SoVITS/webui.py", line 44, in <module>
    from tools import my_utils
ImportError: cannot import name 'my_utils' from 'tools' (/opt/conda/lib/python3.10/site-packages/tools/__init__.py)

@jiaqianjing
Copy link
Contributor Author

Otherwise you can set export PYTHONPATH=/path/to/GPT-SoVITS. This same as path/to/GPT-SoVITS insert to sys.path not append.

@RVC-Boss RVC-Boss merged commit 9317817 into RVC-Boss:main Mar 10, 2024
@jiaqianjing jiaqianjing deleted the bugfix branch March 12, 2024 11:40
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants