FHEM Forum

FHEM => Sonstiges => Thema gestartet von: raxor am 19 April 2019, 23:42:11

Titel: Cannot load module RESIDENTS
Beitrag von: raxor am 19 April 2019, 23:42:11
Hallo Community,

Ich bekomme bei dem Befehl "define resBewohner RESIDENTS" leider folgende Meldung:
Cannot load module RESIDENTS

In der Log steht:
reload: Error:Modul 10_RESIDENTS deactivated: Attempt to reload RESIDENTStk.pm aborted. Compilation failed in require at ./FHEM/10_RESIDENTS.pm line 9.
2019.04.19 23:17:35 0 : Attempt to reload RESIDENTStk.pm aborted. Compilation failed in require at ./FHEM/10_RESIDENTS.pm line 9.

Laut Forum gab es was ähnliches wohl schonmal im Februar, ließ sich bei mir durch ein Update all aber nicht beheben.
https://forum.fhem.de/index.php?topic=97913.0

Hat jemand eine Idee, wie man die Ursache eingrenzen kann?

Kenn mich mit der Fehleranalyse in fhem leider noch nicht so wirklich aus.

Danke und Gruß
Daniel
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: amenomade am 20 April 2019, 00:04:47
Gibt es immer noch  die Datei RESIDENTStk.pm in deinem /opt/fhem/FHEM Verzeichnis, und hat die die richtige Berechtigungen?
Sind das die einzige Meldungen in Log?
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 00:08:08
Danke für deine schnelle Rückmeldung.

Jep ist da. Die Rechte müssten so passen oder?

-rw-r--r--  1 fhem dialout 142362 Apr 18 15:29 RESIDENTStk.pm


Edit:

In den Logs habe ich noch folgendes gefunden:

2019.04.20 00:04:58 1 : PERL WARNING: Use of uninitialized value $value in string eq at fhem.pl line 4702.

kann das daran liegen?
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: amenomade am 20 April 2019, 00:36:17
Ich glaube nicht, dass es daran liegt, aber diese Meldung kannst Du durch das setzen von "attr global stracktrace 1" präzisieren.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 00:56:54
Durch das Stacktrace gibt es jetzt auch weitere Details beim Ausführen des RESIDENTS-Define:

2019.04.20 00:49:07 1 : PERL WARNING: Subroutine RESIDENTS_Initialize redefined at ./FHEM/10_RESIDENTS.pm line 12.
2019.04.20 00:49:07 1 : PERL WARNING: Subroutine RESIDENTS_UpdateReadings redefined at ./FHEM/10_RESIDENTS.pm line 33.
2019.04.20 00:49:07 1 : reload: Error:Modul 10_RESIDENTS deactivated: Attempt to reload RESIDENTStk.pm aborted. Compilation failed in require at ./FHEM/10_RESIDENTS.pm line 9.
2019.04.20 00:49:07 0 : Attempt to reload RESIDENTStk.pm aborted. Compilation failed in require at ./FHEM/10_RESIDENTS.pm line 9.


Sieht für mich jetzt aber nicht so aus als würde das weiterhelfen.


Die andere Meldung ist noch nicht wieder erschienen. Ich reiche den Eintrag nach sobald er erscheint.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 01:21:54
Das andere scheint mit Spotify zu tun zu haben

2019.04.20 01:04:58 1 : PERL WARNING: Use of uninitialized value $value in string eq at fhem.pl line 4702.
2019.04.20 01:04:58 1 : stacktrace:
2019.04.20 01:04:58 1 : main::__ANON__ called by fhem.pl (4702)
2019.04.20 01:04:58 1 : main::readingsBulkUpdateIfChanged called by ./FHEM/37_Spotify.pm (803)
2019.04.20 01:04:58 1 : main::Spotify_dispatch called by FHEM/HttpUtils.pm (606)
2019.04.20 01:04:58 1 : main::__ANON__ called by fhem.pl (742)

Scheint aber was sporadisches zu sein, denn das Modul funktioniert aktuell so wie es soll.

Wegen RESIDENTS, könnte es sein, dass ggf. ein benötigtes Perl Paket defekt ist?
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: amenomade am 20 April 2019, 02:13:28
ZitatWegen RESIDENTS, könnte es sein, dass ggf. ein benötigtes Perl Paket defekt ist?
Kann sein, aber RESIDENTStk nutzt quasi nix: 6 use Data::Dumper;
7
8 use Unit;
9 use FHEM::Meta;

Was sagt "version RESIDENTS" und "version Meta" ?
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 02:40:19
Ich hab mal probiert die RESIDENTStk wo anders hinzukopieren und diese Datei per update force (keine Ahnung, ob das eine schlaue Idee war) neu erstellen zu lassen.

Hat sich aber nichts geändert:
2019.04.20 02:36:47 1 : PERL WARNING: Subroutine RESIDENTS_Initialize redefined at ./FHEM/10_RESIDENTS.pm line 12.
2019.04.20 02:36:47 1 : PERL WARNING: Subroutine RESIDENTS_UpdateReadings redefined at ./FHEM/10_RESIDENTS.pm line 33.
2019.04.20 02:36:47 1 : reload: Error:Modul 10_RESIDENTS deactivated: Attempt to reload RESIDENTStk.pm aborted. Compilation failed in require at ./FHEM/10_RESIDENTS.pm line 9.
2019.04.20 02:36:47 0 : Attempt to reload RESIDENTStk.pm aborted. Compilation failed in require at ./FHEM/10_RESIDENTS.pm line 9.

version RESIDENTS

File            Rev   Last Change

10_RESIDENTS.pm 18995 2019-03-22 20:09:53Z loredo

doif.js                    15546 2017-12-03 09:57:42Z Ellert
fhemweb.js                 19114 2019-04-04 20:22:10Z rudolfkoenig



version Meta


no loaded modules found that match: Meta

doif.js                    15546 2017-12-03 09:57:42Z Ellert
fhemweb.js                 19114 2019-04-04 20:22:10Z rudolfkoenig


Titel: Antw:Cannot load module RESIDENTS
Beitrag von: CoolTux am 20 April 2019, 07:15:38
Hast Du das Meta Modul überhaupt im FHEM Ordner liegen?
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: Loredo am 20 April 2019, 08:37:53
Mich machen die redefined Meldungen stutzig.
Startest du FHEM auch komplett neu oder machst du immer nur ein reload? Das funktioniert nicht unbedingt zuverlässig, wenn du nur einzelne Module neu lädst.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 09:52:06
Zitat von: CoolTux am 20 April 2019, 07:15:38
Hast Du das Meta Modul überhaupt im FHEM Ordner liegen?

Die Meta.pm liegt im FHEM Ordner. Ich wüsste auch gar nicht, wie man die sauber umziehen kann, bzw. wo die Pfade konfiguriert werden müssten.
Zitat von: Loredo am 20 April 2019, 08:37:53
Mich machen die redefined Meldungen stutzig.
Startest du FHEM auch komplett neu oder machst du immer nur ein reload? Das funktioniert nicht unbedingt zuverlässig, wenn du nur einzelne Module neu lädst.

Ich weiß leider nicht genau was ich davon mache, aber ich denk mal komplett neu starten. Ich nutze:
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: CoolTux am 20 April 2019, 11:05:55
Gib Mal in der Kommandozeile

{ use Meta.pm }

ein.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 11:21:50
Zitat von: CoolTux am 20 April 2019, 11:05:55
Gib Mal in der Kommandozeile

{ use Meta.pm }

ein.

Das Ergebnis  :o :

syntax error at (eval 22350) line 1, near "use Meta."
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 11:40:21
Nachtrag:

Mit einem update all ist vor kurzem meine HUEBridge rausgefolgen. Bei dem Versuch die wieder einzubinden erscheint ein ähnlicher Fehler:

Cannot load module HUEBridge

Log:
2019.04.20 11:32:10 1 : reload: Error:Modul 30_HUEBridge deactivated: Attempt to reload FHEM/Meta.pm aborted. Compilation failed in require at ./FHEM/30_HUEBridge.pm line 13. BEGIN failed--compilation aborted at ./FHEM/30_HUEBridge.pm line 13.
2019.04.20 11:32:10 0 : Attempt to reload FHEM/Meta.pm aborted. Compilation failed in require at ./FHEM/30_HUEBridge.pm line 13. BEGIN failed--compilation aborted at ./FHEM/30_HUEBridge.pm line 13.


Aber ansonsten scheint alles andere zu funktionieren.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: amenomade am 20 April 2019, 12:10:27
Zitat von: raxor am 20 April 2019, 11:21:50
Das Ergebnis  :o :

syntax error at (eval 22350) line 1, near "use Meta."

Dann nur { use Meta }
Uns Log-Ausgabe kopieren
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 12:39:34
Logausgabe:

Attempt to reload Module/CoreList.pm aborted.
Compilation failed in require at FHEM/Meta.pm line 17.
BEGIN failed--compilation aborted at FHEM/Meta.pm line 17.
Compilation failed in require at (eval 41713) line 1.
BEGIN failed--compilation aborted at (eval 41713) line 1.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: amenomade am 20 April 2019, 13:16:06
Ich weiss immer noch nicht genau, aber Line 17 von Meta.pm ist:
use Module::CoreList;
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: CoolTux am 20 April 2019, 13:44:21
Ähm ja sorry. Mein Fehler.

Nur Meta bitte.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: Loredo am 20 April 2019, 14:10:41
Module::CoreList ist eigentlich ein Perl Core Modul seit langer Zeit, von daher kann es eigentlich nicht fehlen.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 14:38:12
Zitat von: CoolTux am 20 April 2019, 13:44:21
Ähm ja sorry. Mein Fehler.

Nur Meta bitte.


{ Meta }


Bareword "Meta" not allowed while "strict subs" in use at (eval 69152) line 1.


Zitat von: Loredo am 20 April 2019, 14:10:41
Module::CoreList ist eigentlich ein Perl Core Modul seit langer Zeit, von daher kann es eigentlich nicht fehlen.

Sollte ich mich dann einmal schlau machen, wie man perl repariert?

Bei mir funktioiert es auch aktuell nicht perl pakete wie Crypt::Rijndael_PP oder Crypt::Cipher::AES zu installieren, obwohl ich eigentlich alles gerade erst anfang des Jahres neu aufgesetzt hatte ..

Aber das nur am Rande, falls es bei der eingenzung dieses Problems hilft:


sudo cpan Crypt::Rijndael_PP
...
'YAML' not installed, will not store persistent state
...
JSON::PP 2.27103 is not available
at /usr/share/perl/5.24/CPAN/Meta/Converter.pm line 57.
at /usr/share/perl/5.24/ExtUtils/MM_Any.pm line 978.
JSON::PP 2.27103 is not available
at /usr/share/perl/5.24/CPAN/Meta/Converter.pm line 57.


Titel: Antw:Cannot load module RESIDENTS
Beitrag von: CoolTux am 20 April 2019, 15:23:49
use Meta

nicht

Meta

;D

Also im ganzen dann


use Meta
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 16:03:07
Zitat von: CoolTux am 20 April 2019, 15:23:49
use Meta

nicht

Meta

;D

Also im ganzen dann


use Meta


Ah okay ^^'

{ use Meta }

Attempt to reload Meta.pm aborted.
Compilation failed in require at (eval 92031) line 1.
BEGIN failed--compilation aborted at (eval 92031) line 1.


Nachtrag:

Komisch, habe es gerade nochmal ausgeführt und jetzt kommt wieder eine andere Ausgabe:

Can't locate meta.pm in @INC (you may need to install the meta module) (@INC contains: . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM ./FHEM/lib) at (eval 865) line 1.
BEGIN failed--compilation aborted at (eval 865) line 1.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 17:09:29
Also irgendwas stimmt hier ganz und gar nicht ..

jetzt funktioniert nicht mal mehr apt-get update ...


sudo apt-get update
/usr/lib/apt/methods/http: error while loading shared libraries: lybstdc++.so.6: cannot open shared object file: No such file or directory


Bin fast am überlegen schon wieder neu anzufangen. Wenn der ganze Aufwand nicht wär  :/ ...
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: amenomade am 20 April 2019, 18:59:35
Zitat von: raxor am 20 April 2019, 16:03:07

Nachtrag:

Komisch, habe es gerade nochmal ausgeführt und jetzt kommt wieder eine andere Ausgabe:

Can't locate meta.pm in @INC (you may need to install the meta module) (@INC contains: . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM ./FHEM/lib) at (eval 865) line 1.
BEGIN failed--compilation aborted at (eval 865) line 1.

Da hast Du wahrscheinlich meta statt Meta geschrieben
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 19:05:40
Zitat von: amenomade am 20 April 2019, 18:59:35
Da hast Du wahrscheinlich meta statt Meta geschrieben

Stimmt hast recht
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: Loredo am 20 April 2019, 20:42:00
Das läuft auf einem Raspi, oder?
So wie sich das liest, hat sich deine Speicherkarte verabschiedet. Da hilft leider nur auf einer neuen komplett neu installieren.
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: raxor am 20 April 2019, 21:04:17
Zitat von: Loredo am 20 April 2019, 20:42:00
Das läuft auf einem Raspi, oder?
So wie sich das liest, hat sich deine Speicherkarte verabschiedet. Da hilft leider nur auf einer neuen komplett neu installieren.

Jep, hatte ich schon befürchtet und werde ich jetzt auch machen.

Vielen dank euch allen für eure Mühe und Hilfe! :-)
Titel: Antw:Cannot load module RESIDENTS
Beitrag von: CoolTux am 21 April 2019, 11:32:54
Julian ich habe hier etwas ähnlich gelagertes.

https://forum.fhem.de/index.php/topic,99810.msg932041.html#msg932041


ZitatUndefined subroutine &Module::CoreList::is_core called at FHEM/Meta.pm line 929.