ZSSR icon indicating copy to clipboard operation
ZSSR copied to clipboard

AttributeError: 'Config' object has no attribute 'create_result_dir' ?Please help me,please .

Open mhyy10 opened this issue 4 years ago • 5 comments

Traceback (most recent call last): File "C:/Users/15479/Desktop/ZSSR/run_ZSSR.py", line 75, in main(conf_str, gpu_str) File "C:/Users/15479/Desktop/ZSSR/run_ZSSR.py", line 18, in main res_dir = prepare_result_dir(conf) File "C:\Users\15479\Desktop\ZSSR\utils.py", line 192, in prepare_result_dir if conf.create_result_dir: AttributeError: 'Config' object has no attribute 'create_result_dir'

Process finished with exit code 1

mhyy10 avatar Jan 11 '21 08:01 mhyy10

Hi, It looks like you mistakenly deleted a character. The error you got is saying:

File "C:\Users\15479\Desktop\ZSSR\utils.py", line 192, in prepare_result_dir if conf.create_result_dir: AttributeError: 'Config' object has no attribute 'create_result_dir'

but if you check the code here, you will see that line 192 has 'create_results_dir' Try to fix it if you have some variant of the coder or revert to the original code. Good luck, Assaf.

assafshocher avatar Jan 11 '21 11:01 assafshocher

And my version of python is 3.6 .It's obviously different than what you use in your code.So,could it be a different version of Python? In fact,I run the original code from your github repository.

mhyy10 avatar Jan 11 '21 13:01 mhyy10

You will also have a bit of trouble with py version (see other issues I resolved. Mind mostly for division / ). But note how the quoted code is not the code in the repository. There is a missing S: https://github.com/assafshocher/ZSSR/blob/d2948526fde799a0c111469b78cd9e1b8659cb0f/utils.py#L192

I can't think of any scenario where this is possible with the original code. Try to fix this 's' or to fork/download the code again

assafshocher avatar Jan 11 '21 14:01 assafshocher

thank you Assaf!You are so nice!

---Original--- From: "Assaf Shocher"<[email protected]> Date: Mon, Jan 11, 2021 22:00 PM To: "assafshocher/ZSSR"<[email protected]>; Cc: "ymtupup"<[email protected]>;"Author"<[email protected]>; Subject: Re: [assafshocher/ZSSR] AttributeError: 'Config' object has no attribute 'create_result_dir' ?Please help me,please . (#29)

You will also have a bit of trouble with py version (see other issues I resolved. Mind mostly for division / ). But note how the quoted code is not the code in the repository. There is a missing S: https://github.com/assafshocher/ZSSR/blob/d2948526fde799a0c111469b78cd9e1b8659cb0f/utils.py#L192

I can't think of any scenario where this is possible with the original code. Try to fix this 's' or to fork/download the code again

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mhyy10 avatar Jan 11 '21 14:01 mhyy10

And I fix the 's' run python run_ZSSR.py is ok . But using the Quick usage examples that you write has error,such as python run_ZSSR.py X2_IDEAL_WITH_PLOT_CONF, python run_ZSSR.py X2_GIVEN_KERNEL_CONF, File "run_ZSSR.py", line 18, in main res_dir = prepare_result_dir(conf) File "C:\Users\15479\Desktop\ZSSR\utils.py", line 192, in prepare_result_dir if conf.create_results_dir: AttributeError: 'NoneType' object has no attribute 'create_results_dir' this error comes again.

mhyy10 avatar Jan 12 '21 13:01 mhyy10