pythonmachine-learningartificial-intelligencepython-3.8python-click

I Get "TypeError: 'NoneType' object is not callable" Error on "@main.result_callback()" When executing run.sh for SimpleNet


I am trying yo run SimpleNet network and when I enter the command bash run.sh on the terminal I see the following output:


Matplotlib created a temporary cache directory at /tmp/matplotlib-ovjj_rt5 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

Steps to Produce

  1. Install WSL 20.04 on a Windows 11 computer.

  2. Install python 2.7 and 3.8.10 in WSL

  3. Build OpenCV 4.2.0 from sources with python support.

  4. Clone this repository here into home directory.

  5. Install required packages listed here with pip3.

  6. Download the MVTech dataset into a newly created directory under your home directory.

  7. Extract the tar archive with the command tar -xf mvtec_anomaly_detection.tar.xz inside the directory into which you have downloaded the dataset.

  8. Edit first and tenth lines of run.sh to make it point to the dataset I have just downloaded.

  9. Enter the command bash run.sh

  10. See the error on your terminal

Envirovment:

What Did I Try?

I have seen that up until @main.result_callback(), it was working as expected

I have seen that someone have solved the issue here. But, I couldn't understand what exactly they did to solve the issue.

What I Have Expected

I have expected that as I run the command bash run.sh I would see that the network begin it's training.


Solution

  • Install a version of click package later than 8.0.4.

    The Group.resultcallback method was renamed to Group.result_callback in versions of click package greater than 8.0.4, .