Coder Social home page Coder Social logo

custom module not loading about fame HOT 2 CLOSED

phate1 avatar phate1 commented on June 20, 2024
custom module not loading

from fame.

Comments (2)

Augustin-FL avatar Augustin-FL commented on June 20, 2024

Hi,

Few things here :

  • In order to import a module, you need to use the add module feature on the web interface (or you need to use do_clone() in a python script...see install.py for details). Editing the file structure directly is not supported, and will not work
  • This is because some additional operations are being carried out when cloning/updating a repo. More specifically:
    • After the clone/pull, FAME will try to (re)import all python files of the repo, looking for instances of Module classes in them.
    • If it finds any, it will register it in the database. This will cause the module to appear on the web interface, to be considered by the worker, etc...
    • Note that python files that are invalid (syntax error, import error, etc..) are silently ignored. This is the reason why most modules have try/except blocks when importing external dependencies (the search for Module classes is done before installing requirements.txt)
    • The code carrying out the imports/search of Module classes can be found here.

What likely happens is that your python file yara_proc.py has an error, and that FAME is not able to import it (why? I can't tell without seeing your python module).
You could possibly tune the try/except in module_dispatcher to reveal & analyse the error?

This issue make me think of a new feature to be added : to display a warning message on the web interface when FAME is not being able to import a python file.

Also, regarding troubleshoot.py : indeed, thanks for the report. This will be corrected.

from fame.

phate1 avatar phate1 commented on June 20, 2024

Hey, thanks for the swift reply!
that was indeed the problem it relied on a lib that needed installing, I wrongly assumed the requirements would be processed before trying to run it.
I can now see the module in the UI ... it still doesn't work but I can figure that out from here :)

from fame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.