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

[3.1-beta] (Zigbee2MQTT) failed to load 'plugin.py' #702

Closed
pemca opened this issue Sep 8, 2021 · 36 comments
Closed

[3.1-beta] (Zigbee2MQTT) failed to load 'plugin.py' #702

pemca opened this issue Sep 8, 2021 · 36 comments
Labels
wontfix This will not be worked on

Comments

@pemca
Copy link

pemca commented Sep 8, 2021

Issue description
Domoticz fails to load plugin

Additional information
Zigbee2MQTT version: version 1.21.1 (commit #4a51e0c0)
Python version: 2.7 and 3.7
Domoticz version: 2021.1 - newest stable release (april 2021)
Plugin version: 3.10 beta

Logs
Attach any additional logs here which might be useful: mqtt, domoticz, plugin logs
2021-09-07 21:31:42.415 Error: zigbee2: (Zigbee2MQTT) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/zigbee2mqtt/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-09-07 21:31:42.415 Error: zigbee2: (zigbee2) Module Import failed, exception: 'ModuleNotFoundError'
2021-09-07 21:31:42.415 Error: zigbee2: (zigbee2) Module Import failed: ' Name: DomoticzEx'
2021-09-07 21:31:42.415 Error: zigbee2: (zigbee2) Error Line details not available.

@secator76
Copy link

see: #695 for the solution.
so we can't update the plugin if we don't use domoticz beta version??????

@dobber81
Copy link

dobber81 commented Sep 8, 2021

Correct.

@hughb8on
Copy link
Contributor

hughb8on commented Sep 9, 2021

Given the long gaps between stable domoticz releases, and many users' reluctance to install beta code on their production systems, I think it would be a good idea to keep a branch of the plugin available which doesn't require the DomoticzEx framework.

@stas-demydiuk
Copy link
Owner

@hughb8on you could continue using stable v.3.0 of the plugin, the new beta version is for individuals who want to overcome 255 devices limit which is possible only with the new DomoticzEx framework

@hughb8on
Copy link
Contributor

hughb8on commented Sep 9, 2021

Hi, yes, that's what I'll be doing. I see two problems though.

Firstly, there will be users who have done a 'git pull' without checking the Prerequisites notes. They may not have a backup or they may not know how to 'git reset' to an earlier commit point. Arguably that's "their problem" but it would be kind if there was a stable branch available to simplify things.

Secondly, and more importantly from my perspective, the next stable domoticz release may be a long way off - recently they've been a year apart but two-year gaps are not unusual. This means that any bug fixes, new devices and other improvements to the plugin will be missed by those who don't like the idea of running domoticz beta code.

@sundodger
Copy link

Hi, I am that person @hughb8on refers to.
Just did an update and now all my zigbee devices are "offline".
Update to Beta? in would but that is throwing an unable to communicate with server error.
So how do i roll back the update?

@eleutscher
Copy link

Hi, I am that person @hughb8on refers to.
Just did an update and now all my zigbee devices are "offline".
So how do i roll back the update?

Same here. Never had a problem with the git pull till yesterday. If some could tell me how to get things working again that would be great. Thx

@hughb8on
Copy link
Contributor

hughb8on commented Sep 9, 2021

Make a backup (at a minimum the whole of the plugin folder) just in case. Then stop domoticz, cd into the plugin folder and do this: -

git log

That should show you a list of commit points and their dates, in descending order. Page down through it until you see a commit on Aug 23 at 22:18. You should see a a commit point "3725a295e12531e5c5f68d03d3e6f0c1f646b1ca". That's where you need to go back to.

To regress type this: -

sudo git reset --hard 3725a29
Edit: I see github edited my reply: you need to have the whole of the commit point from the git log results, all "3725a295e12531e5c5f68d03d3e6f0c1f646b1ca" except the quotes.

Restart domoticz. That should be all you have to do.

Bear in mind that although I'm pretty sure this will work, and I have tested it on my own system just now, I don't find myself having to do this often, so beware!

@sundodger
Copy link

sundodger commented Sep 9, 2021

Oh well, as i get a "fatal: your branch appears to be broken i seem to be in trouble until i can find a way to get the beta.
Any other way to roll back?
Edit, A restart of the Raspberry pi/Domoticz and the update showed up. Installed beta and up and running again.
Thanks all.

@eleutscher
Copy link

@hughb8on Thx a lot! That did the trick. :-)

@hughb8on
Copy link
Contributor

hughb8on commented Sep 9, 2021

:-) it's good to have confirmation that works, thank you.

@jupstra
Copy link

jupstra commented Sep 11, 2021

@hughb8on this indeed did the trick! I didn't update for quite a while and unfortunately missed this issue in the various Prerequisites notes...

@azsystem
Copy link

azsystem commented Sep 13, 2021

This version should have number 4.x.x because it is not compatible with old version 3.
Also a warning would be nice, as you did when introducing v3

@stas-demydiuk
Copy link
Owner

Yes, also think about that, but decided to go with 3.1 as there are no breaking changes comparing to the 3.0 version, I mean you could do the upgrade without the need to remove the previous version of the plugin as it was when you were updating 0.2.x to 3.0

Regarding the Domoticz version, plugin always expects that you are using the most recent version to the plugin release date. If it works with previous versions too that's awesome but that's not the goal as well as with zigbee2mqtt version

@anixi
Copy link

anixi commented Sep 16, 2021

Make a backup (at a minimum the whole of the plugin folder) just in case. Then stop domoticz, cd into the plugin folder and do this: -

git log

That should show you a list of commit points and their dates, in descending order. Page down through it until you see a commit on Aug 23 at 22:18. You should see a a commit point "3725a295e12531e5c5f68d03d3e6f0c1f646b1ca". That's where you need to go back to.

To regress type this: -

sudo git reset --hard 3725a29
Edit: I see github edited my reply: you need to have the whole of the commit point from the git log results, all "3725a295e12531e5c5f68d03d3e6f0c1f646b1ca" except the quotes.

Restart domoticz. That should be all you have to do.

Bear in mind that although I'm pretty sure this will work, and I have tested it on my own system just now, I don't find myself having to do this often, so beware!

Hey @hughb8on I have the same problem here with the updated zigbee2mqtt plugin. However git log does not go back any further then September 4:
commit c1f774d
Date: Sat Sep 4 19:59:00 2021 +0300

Any solutions for this?

@hughb8on
Copy link
Contributor

I am surprised you aren't seeing anything older than Sep 4 if you have followed the instruction to page down through the git log.
If there's really nothing older then I guess you'll have to see if you have any more luck than I did persuading @stas-demydiuk to keep a stable branch available for those not wanting to switch to domoticz beta.

@dobber81
Copy link

dobber81 commented Sep 16, 2021

My git log shows releases from back in 2018.
commit 5e8db58f808f87ba42ff143378cbc2f7ea70c312
Author: Stanislav Demydiuk stas-demydiuk@users.noreply.github.com
Date: Sat Sep 15 15:46:03 2018 +0300

@anixi
Copy link

anixi commented Sep 16, 2021

may be stupid question but in which terminal/directory do you do the git log command

@hughb8on
Copy link
Contributor

.. as does mine.

@dobber81
Copy link

/home/pi/domoticz/plugins/zigbee2mqtt/

@hughb8on
Copy link
Contributor

hughb8on commented Sep 16, 2021

@anixi If "git log" works and you see a commit on Sep 4 at 19:59 then you are in the right place. What do you see lower down in the log?

@anixi
Copy link

anixi commented Sep 16, 2021

I see
image

@anixi
Copy link

anixi commented Sep 16, 2021

process seems still on going as I get the "terminal killing" warning when I want to close the window

@hughb8on
Copy link
Contributor

ok, and if you press the down cursor do you not see earlier commits?

@dobber81
Copy link

Or space to jump whole pages.

@anixi
Copy link

anixi commented Sep 16, 2021

oeps, ..... yes I do see that, felling stupid as I used the scroll bar and nothing showed up! Think you saved my day, will continue the process!

@hughb8on
Copy link
Contributor

No worries, most of the fun is in learning.

@anixi
Copy link

anixi commented Sep 16, 2021

true, response is now "HEAD is now at 3725a29 Remove devices argument from Adapters" is that ok and can I start restarting Zigbee2MQtt and domoticz now?

@hughb8on
Copy link
Contributor

hughb8on commented Sep 16, 2021

Yes you can.
"Remove devices argument from Adapters " is just what the author happened to name that particular commit point, not an error message or anything.

@anixi
Copy link

anixi commented Sep 16, 2021

great, it works again, only my "friendly names" are back to codes have to work on that but that is another good learning exercise. Thanks a million!

@klarf-pixel
Copy link

Hi,
I have the same error.
The command (in the plugin folder) : sudo git reset --hard 3725a29 works, but in the next update we will have the same concerns?

@hughb8on
Copy link
Contributor

That's right.

You cannot update the plugin again until you have updated Domoticz to a version which the plugin supports.

That means you must either switch to the Domoticz beta channel, or wait for a new Domoticz stable release.

@pcousin1
Copy link

Installed z2m for the first time today, managed to follow this thread and get back to 23rd august.
But I still have the same errors in the domoticz log after restarting. Any ideas please ?

@jojo1985
Copy link

Make a backup (at a minimum the whole of the plugin folder) just in case. Then stop domoticz, cd into the plugin folder and do this: -

git log

That should show you a list of commit points and their dates, in descending order. Page down through it until you see a commit on Aug 23 at 22:18. You should see a a commit point "3725a295e12531e5c5f68d03d3e6f0c1f646b1ca". That's where you need to go back to.

To regress type this: -

sudo git reset --hard 3725a29 Edit: I see github edited my reply: you need to have the whole of the commit point from the git log results, all "3725a295e12531e5c5f68d03d3e6f0c1f646b1ca" except the quotes.

Restart domoticz. That should be all you have to do.

Bear in mind that although I'm pretty sure this will work, and I have tested it on my own system just now, I don't find myself having to do this often, so beware!

Works for me many thanks

@stas-demydiuk stas-demydiuk changed the title Error: zigbee2: (Zigbee2MQTT) failed to load 'plugin.py', [3.1-beta] (Zigbee2MQTT) failed to load 'plugin.py' Oct 31, 2021
@stas-demydiuk stas-demydiuk added the wontfix This will not be worked on label Oct 31, 2021
@fdammeke
Copy link

fdammeke commented Nov 2, 2021

I also bumped into this, new user, wanting to try the plugin together with the domoticz stable release, its a bit inconvenient, I'm not sure if people will find this bug report that easily and 'understand' what to do / what they're doing in git.

Maybe a wild idea, could you perhaps create github release tags following the domoticz releases? Or create a tag that is compatible with the domoticz stable release? I think v3.0 is a bit behind that 'breaking' commit id 3725a29?

Then add some small line to the docs regarding the domoticz release compatibility and the usage of git checkout tags/<tag> -b <branch>.

@XSebastiaan
Copy link

Noticed today that this is what's wrong in my Domoticz / Zigbee2MQTT setup.

What is the easiest way to update Domoticz to the beta version? (if possible with keeping my now connected devices)

Check for updates says there are no updates.

Version: 2021.1
Build Hash: 8547c5b7e
Compile Date: 2021-04-17 17:29:11
dzVents Version: 3.1.7
Python Version: 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]

I have created a backup just to be sure.

@stale stale bot closed this as completed Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests