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

History quit updating after the OctoPrint 1.4.0 update. #23

Closed
sgano opened this issue Mar 13, 2020 · 16 comments
Closed

History quit updating after the OctoPrint 1.4.0 update. #23

sgano opened this issue Mar 13, 2020 · 16 comments
Labels
type: bug Something isn't working

Comments

@sgano
Copy link

sgano commented Mar 13, 2020

Not sure if the issue is with this plugin or the latest update to OctoPrint. But ever since upgrading to OctoPrint v1.4.0 this plugin no longer records and lists new prints. Any ideas about what may be causing this? (I am using v1.0.0rc5)

@OllisGit
Copy link
Owner

Hi @sgano ,

the RC work currently only with version 1.3.x.
The next version will be compatible with 1.4.x.
Please be patient.

BR
Olli

@OllisGit OllisGit added the status: inNextRelease Will be implemented/fixed in next release label Mar 14, 2020
@sgano
Copy link
Author

sgano commented Mar 15, 2020

No problem, thanks for creating and updating this plugin! I was just trying to narrow down the issue (which could have been on my side) or at the very least be sure the issue was reported/documented. Take care!

@Kyred-Saken
Copy link

Same thing happened to me after updating OctoPrint a few days ago.

@jbjones27
Copy link

Same here. Are there any workarounds to get this working in 1.4.0 in the meantime?
Thanks for your plugin and your support!

@alsand61
Copy link

Same here after updating to OctoPrint 1.4.0
Thanks for the great work, Olli.

Here's the log, in case it helps...

2020-04-11 10:59:37,215 - octoprint.plugin - ERROR - Error while calling plugin PrintJobHistory
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/init.py", line 224, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/init.py", line 328, in on_event
self._createPrintJobModel(payload)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/init.py", line 245, in _createPrintJobModel
tempBed = currentTemps[0]["bed"]["target"]
KeyError: 0

@GilDev
Copy link

GilDev commented Apr 14, 2020

Same here. 🙂

@BzowK
Copy link

BzowK commented Apr 21, 2020

Ditto

@joshlarsen48
Copy link

Same here. Thanks for your work Olli

@Magikti
Copy link

Magikti commented Apr 24, 2020

just a workaround to unlock those waiting for the release: edit the file /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/init.py
and replace:self._figtle_manager.get_metadata(payload["origin"], payload["file"])
by:
self._figtle_manager.get_metadata(payload["origin"], payload["name"])

@Magikti
Copy link

Magikti commented Apr 24, 2020

and, TKS TKS TKS for this very good plugin!!! :)

@alsand61
Copy link

@Magikti Thanks for the workaround !!

just a workaround to unlock those waiting for the release: edit the file /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/init.py
and replace:self._file_manager.get_metadata(payload["origin"], payload["file"])
by:
self._file_manager.get_metadata(payload["origin"], payload["name"])

@anhtuan445
Copy link

I'm not sure it is the correct fix:
Look at the documentation: [(https://docs.octoprint.org/en/master/events/)]

You see in MetadataAnalysisFinished (and othern events)
Deprecated since version 1.3.0:
file: the file’s path within its storage location. To be removed in 1.4.0.

But for this place we need the path and you are replacing it with name. You shoud replace it with path so

self._file_manager.get_metadata(payload["origin"], payload["path"])

Name might work as it also exists but the value in there is not the one we want (unless name is not just file name but also path+name?)

At least it seems so to me, correct me if I'm wrong :)

@jbjones27
Copy link

jbjones27 commented Apr 28, 2020 via email

@rongith
Copy link

rongith commented Apr 29, 2020

For me it is self._file_manager.get_metadata(payload["origin"], payload["path"]) which is working. "name" doesn't work.
OctoPrint 1.4.0 running on OctoPi 0.17.0

Thanx @anhtuan445

@anhtuan445
Copy link

For me path and name both worked and if I debugged the values then they both gave the file name. My files are on local storage (not sd card, so payload origin is local). But I have seen that for some the name works and for some the path.

You can check with self._logger.info(payload["name"]); and self._logger.info(payload["path"]); command and then look in octoprint.log file (from /home/pi/.octoprint/logs/ o from preferences tab and Logging).

As this command needs the actual file path then path seems more appropriate, but how it works with name eludes me :D Hopefully someone with more knowledge will explain it.

My OctoPi is 0.16.0, OctoPrint 1.4.0 by the way.

OllisGit added a commit that referenced this issue May 3, 2020
- #27, #23, #14 python 3 and OP 1.4
- #20 option to ignore failed prints
- #17, #15 spelling
- #12 table attribute visibility
@OllisGit OllisGit added type: bug Something isn't working and removed status: inNextRelease Will be implemented/fixed in next release labels May 3, 2020
@OllisGit
Copy link
Owner

OllisGit commented May 3, 2020

Hi,
it's fixed in the new release candidate, see release description: https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/tag/1.0.0rc6

@OllisGit OllisGit closed this as completed May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests