csjliang / DASR

Official implementation of the paper 'Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution' in ECCV 2022
Apache License 2.0
132 stars 9 forks source link

TypeError: tuple indices must be integers or slices, not str #1

Closed AIisCool closed 2 years ago

AIisCool commented 2 years ago

File "C:\DASR\basicsr\test.py", line 45, in <module> test_pipeline(root_path) File "C:\DASR\basicsr\test.py", line 19, in test_pipeline make_exp_dirs(opt) File "C:\Python39\lib\site-packages\basicsr\utils\dist_util.py", line 80, in wrapper return func(*args, **kwargs) File "C:\Python39\lib\site-packages\basicsr\utils\misc.py", line 40, in make_exp_dirs path_opt = opt['path'].copy() TypeError: tuple indices must be integers or slices, not str

csjliang commented 2 years ago

Hi,

Thanks for your attention to our work. The code is validated on my Linux environment, please check if it is due to the mismatch of python packages or provide more information about the error. Thanks!

zhangyunming commented 2 years ago

same question

csjliang commented 2 years ago

same question

Hi,

Could you please provide more information about this error? e.g., your environment. Or, is it possible for you to conduct the experiments on a Linux system? Thanks.

zhangyunming commented 2 years ago

ubuntu@ubuntu:/home/zhangyunming/DASR$ python basicsr/test.py -opt options/test/DASR/test_DASR.yml Disable distributed. Traceback (most recent call last): File "basicsr/test.py", line 45, in test_pipeline(root_path) File "basicsr/test.py", line 19, in test_pipeline make_exp_dirs(opt) File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/basicsr/utils/dist_util.py", line 80, in wrapper return func(*args, **kwargs) File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/basicsr/utils/misc.py", line 40, in make_exp_dirs path_opt = opt['path'].copy() TypeError: tuple indices must be integers or slices, not str ubuntu@ubuntu:/home/zhangyunming/DASR$

torch 1.9.0 ubuntu 18.04

csjliang commented 2 years ago

Hi,

Thanks for your information. Please follow our instructions by adding PYTHONPATH="./:${PYTHONPATH}" before the command line. Thanks.

zhangyunming commented 2 years ago

it is ok. thank you

why add PYTHONPATH="./:${PYTHONPATH}"?

csjliang commented 2 years ago

it is ok. thank you

why add PYTHONPATH="./:${PYTHONPATH}"?

It specifies the work dir, as there are many relative paths in our code. Thanks.