Hello!
I try to make a new plugin. I have done instructions from Plugin Tutorial. I have problem in creation an object. I used class from extra library, that tested befor.
init.py
def on_startup(self):
self._logger.info("Filament NFC ")
self.nfc = NFCmodule()
And in the octoprint.log I see this:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
instance = imp.load_module(module_name, f, filename, description)
File "/home/pi/devel/OctoPrint-Filamentnfc/octoprint_FilamentNFC/init.py", line 13, in
octoprint.plugin.StartupPlugin):
File "/home/pi/devel/OctoPrint-Filamentnfc/octoprint_FilamentNFC/init.py", line 17, in FilamentnfcPlugin
self.nfc = NFCmodule()
NameError: name 'self' is not defined
I feel that it is very stuped error. I will be very grateful for the help.