BBVA / waf-brain

Machine Learning WAF Based
Apache License 2.0
92 stars 35 forks source link

SanicException Error Encountered When Running WAF #7

Open silver46 opened 6 months ago

silver46 commented 6 months ago

Hi, during the installation of WAF from the GitHub repository, I encountered an issue. The installation was successful; however, when I attempted to execute the waf command, the following exception was thrown:

sanic.exceptions.SanicException: Sanic instance named 'waf_brain.service.make_web_app' uses an invalid format. Names must begin with a character and may only contain alphanumeric characters, _, or -.

This exception prevents WAF from starting correctly. I would like assistance on how to resolve this issue. What are the possible solutions to fix this exception and get WAF running smoothly?

imhamzasajjad commented 1 month ago

HI, To solve this error, you can update the requirement.txt file because the latest version of Sanic causes this issue. Bellow can be the suitable version for each dependency.

  1. h5py==3.10.0
  2. keras==2.14.0
  3. sanic==20.3.0
  4. aiohttp==3.8.6
  5. tensorflow==2.14.0

After that, if you see an error because of the numpy, you must add numpy<2.0.0 in the requirement.txt file.