yjxiong / anet2016-cuhk

Action Recognition Toolbox for CUHK&ETHZ&SIAT submission to ActivityNet 2016
BSD 2-Clause "Simplified" License
252 stars 92 forks source link

Error while running classify.py #14

Closed kousik97 closed 7 years ago

kousik97 commented 7 years ago

When I am trying to execute classify.py, I get the following error:

File "examples/classify_video.py", line 13, in anet_home = os.environ['ANET_HOME'] File "/Users/Kousik/anaconda/envs/py27/lib/python2.7/UserDict.py", line 40, in getitem raise KeyError(key) KeyError: 'ANET_HOME'

yjxiong commented 7 years ago

ANET_HOME is an environmental variable. It should point to the root directory of this codebase.

kousik97 commented 7 years ago

So, How do I fix this error?

yjxiong commented 7 years ago

Usually, we set an environmental variable in bash by

export ANET_HOME=<install location>

Or one can specify this variable before a bash command, like

ANET_HOME=<install location> python classifiy_video.py -h

Malithi-gif commented 3 years ago

raceback (most recent call last): File "examples/classify_video.py", line 13, in anet_home = os.environ['ANET_HOME'] File "/usr/lib/python3.6/os.py", line 669, in getitem raise KeyError(key) from None KeyError: 'ANET_HOME'

@yjxiong ,How to fix this in google colab?

LucyQiu commented 3 years ago

Hi all, How to set ANET_CFG? I tried to set ANET_CFG as the same of ANET_HOME ( root directory of this codebase). I still run into the error of: File "/anet2016-cuhk/pyActionRec/init.py", line 1, in from config import ANET_CFG ImportError: cannot import name 'ANET_CFG' from 'config' (/anaconda/2019.10-p3.7/lib/python3.7/site-packages/config/init.py)

Please advise!

LucyQiu commented 3 years ago

@yjxiong thanks!

LucyQiu commented 3 years ago

I forgot mention, ANET_HOME issue fixed. @yjxiong @kousik97 @wanglimin @Malithi-gif

Richard-Css commented 1 year ago

I forgot mention, ANET_HOME issue fixed. @yjxiong @kousik97 @wanglimin @Malithi-gif

How did you solve this problem?

Richard-Css commented 1 year ago

(anet) root@9bd8963cd7e6:~/anet2016-cuhk# python examples/classify_video.py data/plastering.avi Traceback (most recent call last): File "examples/classify_video.py", line 17, in from pyActionRec.action_classifier import ActionClassifier File "/root/anet2016-cuhk/pyActionRec/init.py", line 1, in from config import ANET_CFG ModuleNotFoundError: No module named 'config'

ANET_HOME=/root/anet2016-cuhk/ ANET_CFG=/root/anet2016-cuhk/

Hello, what is the problem? @LucyQiu @yjxiong