question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named misc.resnet_utils (while running the prepro_feats.py)

See original GitHub issue

I had this issue trying to run scripts/prepro_feats.py. Looks like the script could not import the above module misc.

Worked for me changing the prepro_feats.py on lines 49 and 50 to:

from ..misc.resnet_utils import myResnet
import ..misc.resnet as resnet

and running (from the above repo’s path):

python -m self_critical.scripts.prepro_feats --input_json self_critical/data/dataset_coco.json --output_dir self_critical/data/cocotalk --images_root $IMAGE_ROOT --model_root self_critical/data/imagenet_weights/

Notice that I changed the repo’s name to avoid conflict (Not sure if it’s necessary).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ZishunYucommented, Feb 28, 2019

changing lines 49 and 50 from …misc.resnet_utils import myResnet form …misc import resnet works for me

Indeed I think changing repo’s name is necessary for me, I have to get rid of ‘.’ in the repo’s name to make it work. I also run it from above the repo’s path, didn’t try running from repo’s root path

0reactions
ruotianluocommented, Jun 6, 2020

Do you still have the problem with the master branch?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pytest/Locust: ModuleNotFoundError No module named
If you want to execute locust at sub-folder and module not found still happened, try Step 3. Within instr_performance.py, append parent path ...
Read more >
ModuleNotFoundError: No module named x
A python package can contain any number of nested sub-packages, i.e. packages that contain other packages down the hierarchy of the project ...
Read more >
How to fix ModuleNotFoundError: No module named 'skmisc'?
Depending on how your system is set up, this command pip install --user scikit-misc could be installing the package for Python v2, while...
Read more >
No module named misc - How to resolve this when installing ...
After installing deeptools, I try and execute ./bamCoverage; I get this error. Traceback (most recent call last): File "./bamCoverage", line 4, in <module>...
Read more >
Fix ModuleNotFoundError (No Module Named Requests ...
python #error #fix #fixed #howto Hey guys in this tutorial let's try to fix ModuleNotFoundError No module named error in cases where the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found