neuralangelo icon indicating copy to clipboard operation
neuralangelo copied to clipboard

ModuleNotFoundError: No module named 'third_party.colmap' , error in colab notebook while running it as it is given on the project page

Open thevaibhavkute opened this issue 2 years ago • 8 comments

ModuleNotFoundError: No module named 'third_party.colmap' , I got this error in colab notebook while running it as it is given on the project page... I just done run all not made any changes but still getting this error

here is full log:

image /content/neuralangelo

ModuleNotFoundError Traceback (most recent call last) in <cell line: 12>() 10 # Import imaginaire modules. 11 from projects.nerf.utils import camera, visualize ---> 12 from third_party.colmap.scripts.python.read_write_model import read_model 13 # Read the COLMAP data. 14 cameras, images, points_3D = read_model(path=f"{colmap_path}/sparse", ext=".bin")

ModuleNotFoundError: No module named 'third_party.colmap'

thevaibhavkute avatar Oct 24 '23 17:10 thevaibhavkute

This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model

This should fix your issue.

gray-floyd avatar Oct 25 '23 15:10 gray-floyd

This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model

This should fix your issue.

Thank you. It worked

NagaPadma avatar Oct 26 '23 09:10 NagaPadma

This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model

This should fix your issue.

Thank you.

thevaibhavkute avatar Oct 27 '23 06:10 thevaibhavkute

heyy,

I am Padma. I am working on Neuralangelo as part of my project. I have a problem while creating .json. this was the error. Do know you know to fix it ?. I tried but somehow i couldnt. Any suggestions? Looking forward to it.

File "/content/neuralangelo/projects/neuralangelo/scripts/convert_data_to_json.py", line 24, in from content.neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA ModuleNotFoundError: No module named 'content'

On Fri, Oct 27, 2023 at 8:24 AM VAIBHAV KUTE @.***> wrote:

This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model

This should fix your issue.

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/NVlabs/neuralangelo/issues/146#issuecomment-1782365216, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4BHMVTSIXBD3JZVYTFDZKLYBNHR7AVCNFSM6AAAAAA6OCJW3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGM3DKMRRGY . You are receiving this because you commented.Message ID: @.***>

NagaPadma avatar Oct 27 '23 07:10 NagaPadma

heyy, I am Padma. I am working on Neuralangelo as part of my project. I have a problem while creating .json. this was the error. Do know you know to fix it ?. I tried but somehow i couldnt. Any suggestions? Looking forward to it. File "/content/neuralangelo/projects/neuralangelo/scripts/convert_data_to_json.py", line 24, in from content.neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA ModuleNotFoundError: No module named 'content' On Fri, Oct 27, 2023 at 8:24 AM VAIBHAV KUTE @.> wrote: This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model This should fix your issue. Thank you. — Reply to this email directly, view it on GitHub <#146 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4BHMVTSIXBD3JZVYTFDZKLYBNHR7AVCNFSM6AAAAAA6OCJW3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGM3DKMRRGY . You are receiving this because you commented.Message ID: @.>

Yes... facing same error...... have you solved it?

thevaibhavkute avatar Nov 03 '23 04:11 thevaibhavkute

heyy, I am Padma. I am working on Neuralangelo as part of my project. I have a problem while creating .json. this was the error. Do know you know to fix it ?. I tried but somehow i couldnt. Any suggestions? Looking forward to it. File "/content/neuralangelo/projects/neuralangelo/scripts/convert_data_to_json.py", line 24, in from content.neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA ModuleNotFoundError: No module named 'content' On Fri, Oct 27, 2023 at 8:24 AM VAIBHAV KUTE @.> wrote: This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model This should fix your issue. Thank you. — Reply to this email directly, view it on GitHub <#146 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4BHMVTSIXBD3JZVYTFDZKLYBNHR7AVCNFSM6AAAAAA6OCJW3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGM3DKMRRGY . You are receiving this because you commented.Message ID: _@**.**_>

Yes... facing same error...... have you solved it?

i havenot solved yet. I tried the same thing as mentioned above still i had problem converting data to .json. If you had solved,Please let me know.

NagaPadma avatar Nov 06 '23 09:11 NagaPadma

I'm getting the same error

heyy, I am Padma. I am working on Neuralangelo as part of my project. I have a problem while creating .json. this was the error. Do know you know to fix it ?. I tried but somehow i couldnt. Any suggestions? Looking forward to it. File "/content/neuralangelo/projects/neuralangelo/scripts/convert_data_to_json.py", line 24, in from content.neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA ModuleNotFoundError: No module named 'content' On Fri, Oct 27, 2023 at 8:24 AM VAIBHAV KUTE @.> wrote: This is mainly because of issue in directory naming. when cloning the repo in Notebook, the directory would be sth like: ' neuralangelo/third_party/colmap/...'. Therefore, you should update the import command to: from neuralangelo.third_party.colmap.scripts.python.read_write_model import read_model This should fix your issue. Thank you. — Reply to this email directly, view it on GitHub <#146 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4BHMVTSIXBD3JZVYTFDZKLYBNHR7AVCNFSM6AAAAAA6OCJW3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGM3DKMRRGY . You are receiving this because you commented.Message ID: _@**.**_>

Yes... facing same error...... have you solved it?

i havenot solved yet. I tried the same thing as mentioned above still i had problem converting data to .json. If you had solved,Please let me know.

I've been trying to fix this for the last few hours to no avail. Someone please help! :(

shayikhhossain avatar Nov 07 '23 08:11 shayikhhossain

It's a naming problem, because an already existing third_party module has a conflict with neuralangelo.third_party, and obviously the third_ party module in colab has no colmap class, you have to add the path in the file and rename it like this:

In the convert_data_to_json.py modify it, or in any other files that reference to neuralangelo.third_party module, the solution is the same

from third_party.colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA

#ADD PATH sys.path.append('MY_PATH_TO_NEURALANGELO_REPOSITORY/third_party') #CHANGE IT TO, removing third_party. from colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA

vcadillog avatar Nov 18 '23 22:11 vcadillog