shell-init: error retrieving current directory

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Aleq
    Smart Home'r
    • 04.05.2016
    • 53

    shell-init: error retrieving current directory

    Hi guys,
    does anyone have an idea, what could cause error:
    Code:
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    I'm getting this in my log of a plugin I'm working on. The plugin has a daemon script, which executes Python script. This Python script then executes bash script from time to time using:
    Code:
     
     output = subprocess.check_output(cmd, startupinfo=None)
    • It happens only after installation/upgrade of the plugin. If LoxBerry is restarted, the error isn't appearing
    • It appears with every bash script call
    • It appears in the log before the bash script output is received (possibly during)
    • Everything seems to be working despite the error
    • the content of bash script doesn't seem to the reason, it happens even with
    Code:
    #!/bin/bash
    #
    whoami
    Ani tips are welcome.

    Thanks, Best regards,
    Aleq
  • Christian Fenzl
    Lebende Foren Legende
    • 31.08.2015
    • 11218

    #2
    Hi,

    I'm not in Python, but could find this: https://github.com/alcatraz/Alcatraz...ment-117986201

    During Plugin upgrade, all the plugin folders are deleted and then recreated - if your python script still keeps running, this might cause the message as the script looses it's working directory.

    Best regards,
    Christian
    Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

    Kommentar

    • Aleq
      Smart Home'r
      • 04.05.2016
      • 53

      #3
      Yes!
      PWD was /tmp/....

      Corrected by inserting
      Code:
      cd $pluginbindir
      in front of the python script execution in daemon file.

      Thank you!
      Aleq

      Kommentar

      Lädt...