Pilhyeon / Learning-Action-Completeness-from-Points

Official Pytorch Implementation of 'Learning Action Completeness from Points for Weakly-supervised Temporal Action Localization' (ICCV-21 Oral)
MIT License
82 stars 15 forks source link

AttributeError: 'Namespace' object has no attribute 'read' How should I do? #14

Open XD-mu opened 6 months ago

XD-mu commented 6 months ago

Hello author, I encountered this error when running your code and cannot solve it. What is the reason? The environment and dependent libraries I configured according to your documentation are the same.

Traceback (most recent call last): File "./main.py", line 21, in config = Config(args) File "/home/mcy/miniconda3/envs/python36/lib/python3.6/site-packages/config/init.py", line 709, in init self.load(stream_or_path) File "/home/mcy/miniconda3/envs/python36/lib/python3.6/site-packages/config/init.py", line 803, in load items = p.container() File "/home/mcy/miniconda3/envs/python36/lib/python3.6/site-packages/config/parser.py", line 285, in container self.advance() File "/home/mcy/miniconda3/envs/python36/lib/python3.6/site-packages/config/parser.py", line 130, in advance self.token = self.tokenizer.get_token() File "/home/mcy/miniconda3/envs/python36/lib/python3.6/site-packages/config/tokens.py", line 997, in get_token c = get_char() File "/home/mcy/miniconda3/envs/python36/lib/python3.6/site-packages/config/tokens.py", line 802, in get_char c = self.stream.read(1) AttributeError: 'Namespace' object has no attribute 'read'

Pilhyeon commented 6 months ago

I am not sure, but it seems like L21 of the "main.py" calls the init function of the external "config" module.

It is an unexpected behavior, because the purpose of the line is to generate a "Config" object of "config.py".

You may check this.

XD-mu commented 6 months ago

Thanks to the author for your timely answer. My problem has been solved after updating main.py.