Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.4.0rc5] self._printer injected into plugins is broken under py3 and can't be used #3455

Closed
foosel opened this issue Feb 18, 2020 · 2 comments
Closed

Comments

@foosel
Copy link
Member

@foosel foosel commented Feb 18, 2020

Problem

2020-02-18 16:04:04,936 - octoprint.plugin - ERROR - Error while calling plugin test_self_printer
Traceback (most recent call last):
  File "C:\Devel\OctoPrint\OctoPrint\src\octoprint\plugin\__init__.py", line 224, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "C:\Devel\OctoPrint\OctoPrint\src\octoprint\plugins\test_self_printer.py", line 8, in on_event
    self._logger.info("Connected to printer: {}".format(self._printer))
  File "C:\Devel\OctoPrint\devenv3\lib\site-packages\wrapt\wrappers.py", line 118, in __str__
    return str(self.__wrapped__)
  File "C:\Devel\OctoPrint\devenv3\lib\site-packages\wrapt\wrappers.py", line 194, in __getattr__
    raise ValueError('wrapper has not been initialised')
ValueError: wrapper has not been initialised

Test plugin:

import octoprint.plugin

from octoprint.events import Events

class TestSelfPrinterPlugin(octoprint.plugin.EventHandlerPlugin):
	def on_event(self, event, payload):
		if event == Events.CONNECTED:
			self._logger.info("Connected to printer: {}".format(self._printer))


__plugin_implementation__ = TestSelfPrinterPlugin()

Solution

Already fixed in b42c753

@GitIssueBot

This comment has been minimized.

Copy link
Collaborator

@GitIssueBot GitIssueBot commented Feb 26, 2020

This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there:

https://community.octoprint.org/t/new-release-candidate-1-4-0rc6/16502/1

@foosel

This comment has been minimized.

Copy link
Member Author

@foosel foosel commented Feb 26, 2020

1.4.0rc6 is out

@foosel foosel closed this Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.