DonaldRR / SimpleNet

MIT License
402 stars 59 forks source link

"File "main.py", line 43, in <module> @main.result_callback() TypeError: 'NoneType' object is not callable" When Trying to Run "run.sh" #59

Closed mericgeren closed 6 months ago

mericgeren commented 6 months ago

Hello,

I have cloned on WSL running Ubuntu 20.04.6 LTS with Python version 3.8.10 and OpenCV 4.2 (built from source for python) installed. Then, installed packages listed here with the exception of opencv-python. After installing required packages with their dependencies, I have downloaded the mvtech dataset into a folder named "mvtech_dataset" under /home directory and extracted it there. As I got the dataset, I have edited the first line of "run.sh" script as such: "datapath=/home/username/mvtech_dataset". After editing, I have tried to run the "run.sh" script and got the following output:


Matplotlib created a temporary cache directory at /tmp/matplotlib-zdfrxkmk because the default path (/home/username/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Traceback (most recent call last):
  File "main.py", line 43, in <module>
    @main.result_callback()
TypeError: 'NoneType' object is not callable

Could you share the reason and the solution for this issue please?

Kindest regards.

mericgeren commented 6 months ago

This issue is solved.

To solve the issue you need to install or update click library with the command pip3 install click==8.0.4. If you don't use a version >= 8.0.4, you get the error:


Traceback (most recent call last):
  File "main.py", line 43, in <module>
    @main.result_callback()
TypeError: 'NoneType' object is not callable