Closed AlexPHorta closed 4 years ago
Er..... even if i often say if this fixes it, keep it. I king of find this fix confusing.
hey works fine for the first 3 lines after pressing OK. But I'm getting
NameError: name 'logger' is not defined
when i press the download button and doing other stuff in gui.py
* I wouldn't personally use a filename similar to the one that imports the module functionality (import is logger, wouldn't use loggers, its confusing)
Good point, keeping the logger in gui.py results in an import error, due to circular reference. So, I chose to move the logger instantiation to a separate file. I believe it can be placed in helpers.py too.
* Remove commented code if a fix is applied. Helps to read it quicker.
REALLY sorry about that, late night coding.
* you can define the setup in the same place you import the logging as well. (Why would you separate the configuration from the module import, hence that wont change things)
I believe changing the instantiation to helpers.py would solve this, right?
* I hate myself by being harsh to you making these rude comments. But I hope you understand im trying to come up with the logic used here.
You're being objective, that's not harsh nor rude. Thank you.
hey works fine for the first 3 lines after pressing OK. But I'm getting
NameError: name 'logger' is not defined
when i press the download button and doing other stuff in gui.py
My mistake, REALLY sorry about that too. I'll fix it this night. This tells me we need tests.
I fixed the error, just imported logger from loggers.py your file into gui.py
We do need test but I've 0 knowledge with tests. I see some github repo run automatic tests on every pull request? And also thats why we cross check before merging
@alexphorta: all good, take your time, thanks for answering the questions @cherylli: I will look onto this with github automation to run tests every time we submit a pull request. I agree on this, see which functions are vital and create unittests for these.
I fixed the error, just imported logger from loggers.py your file into gui.py
Thanks, Ryan, I won't be able to code for hours.
Put in helpers sounds fine
Alright, everything working. Code clean. I tested the program and it's working fine. I placed the logger instantiation in helpers.py and deleted loggers.py.
Fixed the double logger issue ( #55 ). Had to move some things around to get everything working.