Error while calling plugin tracking

Hi Gina,
It looks like tracking plugin misbehaves if it was not activated during the upgrade to 1.3.10 version. When performing the upgrade I initially decided to disable the plugin and started getting errors in the log like these:

> 2018-12-22 10:51:27,412 - octoprint.plugin - ERROR - Error while calling plugin tracking
> Traceback (most recent call last):
>   File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 230, in call_plugin
>     result = getattr(plugin, method)(*args, **kwargs)
>   File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 119, in on_event
>     self._track_printjob_event(event, payload)
>   File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 237, in _track_printjob_event
>     sha.update(self._settings.get([b"unique_id"]))
> TypeError: update() argument 1 must be string or buffer, not None
> 2018-12-22 10:51:27,629 - octoprint.plugin - ERROR - Error while calling plugin tracking
> Traceback (most recent call last):
>   File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 230, in call_plugin
>     result = getattr(plugin, method)(*args, **kwargs)
>   File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 119, in on_event
>     self._track_printjob_event(event, payload)
>   File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 237, in _track_printjob_event
>     sha.update(self._settings.get([b"unique_id"]))
> TypeError: update() argument 1 must be string or buffer, not None
> 2018-12-22 10:51:29,856 - octoprint.util.comm - INFO - Got a resend request for line 1 which is also our current line. It looks like we just handled a reset and this is a left over of this

I searched these forums and found the thread that mentions this error https://discourse.octoprint.org/t/how-to-troubleshoot-print-freeze/6011/19 Following OutsourcedGuru's suggestion I checked config.yaml file and Anonymous Usage Tracking page under Settings and discovered that Instance ID is missing (shows N/A in UI).
I enabled plugin and restarted Octoprint. Instance ID field got populated. I will monitor the log and report if I see this error message again. I my opinion if plugin is disabled, it should not be called at all. If that is not possible by some reason, please make sure you create Instance ID, even if user decides to deactivate tracking plugin during the upgrade.

Thanks
Happy Holidays!
Boris

Yep, looks like the unique_id wasn't generated. Can you file an issue? (if you don't have a github account, I can do so)

Hi @tedder42,
I created ticket #2967, but by some reason, it is labeled as 'Incomplete'. Unfortunately the message did not say what exactly is missing. Could you please have a look? Here is the link: Ticket 2967

Thanks

It sniffs things based on how you use the template from creating a new issue. You did a good job writing it, though.

So, do I need to add anything? GitIssueBot says ticket will auto-close if I do not provide info within 2 weeks.

Nah, it's fine. Gina is taking a holiday break, but I'm putting in a PR based on that so it shouldn't get lost.

Just to update readers of this thread:
Once plugin was enabled and unique_id was created, I disabled plugin again (just to test) and there were no more errors in the log. So we do have a workaround.

Thanks

I just helped another user on here who got upgraded straight from v1.3.8 -> v1.3.10 and likewise, they had nothing in that section of config.yaml. Presumably, by toggling OFF/ON the plugin in the Settings page for it, that's enough to auto-generate/fix the config.yaml (requiring a restart afterwards).