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

Unable to run, attempted to make changes but still failed #1046

Open
Qiii77 opened this issue Mar 15, 2024 · 2 comments
Open

Unable to run, attempted to make changes but still failed #1046

Qiii77 opened this issue Mar 15, 2024 · 2 comments

Comments

@Qiii77
Copy link

Qiii77 commented Mar 15, 2024

back (most recent call last):
File "D:\opensourceProject\OpenSfM\annotation_gui_gcp\main.py", line 11, in
from annotation_gui_gcp.lib import GUI
File "D:\opensourceProject\OpenSfM\annotation_gui_gcp\lib\GUI.py", line 14, in
from opensfm import dataset
File "D:\opensourceProject\OpenSfM\opensfm_init_.py", line 2, in
from opensfm import pybundle
ImportError: cannot import name 'pybundle' from partially initialized module 'opensfm' (most likely due to a circular import)

@MaxWinklh2908
Copy link

I also had this issue. Solved it by insert the following lines in annotation_gui_gcp/main.py before the line from annotation_gui_gcp.lib import GUI:

# Add opensfm directory to path
import os
opensfm_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
import sys
sys.path.append(opensfm_dir)

@Qiii77
Copy link
Author

Qiii77 commented Mar 20, 2024

I also had this issue. Solved it by insert the following lines in annotation_gui_gcp/main.py before the line from annotation_gui_gcp.lib import GUI:

# Add opensfm directory to path
import os
opensfm_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
import sys
sys.path.append(opensfm_dir)

I tried according to your method, but the result is still the same as before and cannot run. May require some other suggestions,thank you very much.

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

No branches or pull requests

2 participants