Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    3.5.0-rc.1 has the working directory definition changed?

    Scheduled Pinned Locked Moved Solved
    Plugins for DWC and DSF
    2
    7
    312
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stuartofmtundefined
      stuartofmt
      last edited by stuartofmt

      @chrishamm

      I've recompiled DuetLapse3 against 3.5.0-rc.1 (no other changes).

      I get this error
      22553be6-c571-4ee2-a1b5-6b2c0b015180-image.png

      This is the output from journalctl

      Sep 19 11:02:49 srsender DuetPluginService[219029]:    System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/opt/dsf/plugins/DuetLapse3/dsf/DuetLapse3.py' with working directory '/opt/dsf/plugins/DuetLapse3/dsf'. No such file or directory
      Sep 19 11:02:49 srsender DuetControlServer[219006]:    DuetAPI.InternalServerException: An error occurred trying to start process '/opt/dsf/plugins/DuetLapse3/dsf/DuetLapse3.py' with working directory '/opt/dsf/plugins/DuetLapse3/dsf'. No such file or directory
      Sep 19 11:02:49 srsender DuetWebServer[730]: DuetWebServer.Controllers.MachineController[0] [StartPlugin] Failed to start plugin DuetAPI.InternalServerException: An error occurred trying to start process '/opt/dsf/plugins/DuetLapse3/dsf/DuetLapse3.py' with working directory '/opt/dsf/plugins/DuetLapse3/dsf'. No such file or directory    at DuetAPIClient.BaseConnection.PerformCommand(BaseCommand command, CancellationToken cancellationToken) in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetAPIClient/BaseConnection.cs:line 156    at DuetWebServer.Controllers.MachineController.StartPlugin() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetWebServer/Controllers/MachineController.cs:line 1105
      
      

      The permissions look ok

      pi@srsender:/opt/dsf/plugins/DuetLapse3 $ ls -l
      total 8
      drwxrwxr-x 2 dsf dsf 4096 Sep 19 08:55 dsf
      drwxrwxr-x 4 dsf dsf 4096 Sep 19 08:55 dwc
      pi@srsender:/opt/dsf/plugins/DuetLapse3 $ ls -l ./dsf
      total 152
      -rwxrwx--- 1 dsf dsf 152930 Sep 19 08:55 DuetLapse3.py
      pi@srsender:/opt/dsf/plugins/DuetLapse3 $ 
      
      

      I presume (???) that the correct version of the dev environment for rc.1 is here https://github.com/Duet3D/DuetWebControl/tree/v3.5-dev

      If I run the plugin code manually - it works as expected:

      sudo python3 /opt/dsf/plugins/DuetLapse3/dsf/DuetLapse3.py -file /opt/dsf/sd/sys/DuetLapse3/DuetLapse3.config
      
      

      My plugin.json is below. The only change from 3.5.0-beta.4 (which worked fine) is the version requirements

      {
          "id": "DuetLapse3",
          "name": "DuetLapse3",
          "author": "Stuartofmt",
          "version": "5.3.2",
          "license": "GPL-2.0-or-later",
          "homepage": "https://github.com/stuartofmt/DuetLapse3",
          "dwcVersion": "3.5.0-rc.1",
      	"sbcRequired": true,
      	"sbcDsfVersion": "3.5.0-rc.1",
      	"sbcExecutable": "DuetLapse3.py",
      	"sbcExecutableArguments": "-file /opt/dsf/sd/sys/DuetLapse3/DuetLapse3.config",
      	"sbcOutputRedirected": false,
      	"sbcPermissions": ["commandExecution", "objectModelReadWrite", "networkAccess", "webcamAccess", "readSystem", "writeSystem", "fileSystemAccess","launchProcesses", "managePlugins"],
      	"sbcPythonDependencies": ["requests", "psutil"]
       }
      
      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @stuartofmt
        last edited by

        @stuartofmt Can you please share the full plugin ZIP bundle so I can give it a try?

        Duet software engineer

        1 Reply Last reply Reply Quote 0
        • stuartofmtundefined
          stuartofmt
          last edited by

          @chrishamm

          Here you go. It installs without error but throws the above as soon as Start is pressed.

          DuetLapse3-5.3.2.zip.txt

          stuartofmtundefined 1 Reply Last reply Reply Quote 0
          • stuartofmtundefined
            stuartofmt @stuartofmt
            last edited by stuartofmt

            @chrishamm

            I misreported. Something was changed!

            This is the first build of the plugin I am attempting on Bullseye 64K with DSF/DWC installed using the usual instructions. The installation was error free and I have full control over my printer using DWC. ALso, as reported above, I can successfully invoke the plugin code from the command line.

            About a year ago or so ago, I had the same error and ended up "downgrading" to the official Duet3d Buster release to get it working.

            Is it possible that there is something between the two versions of Debian that is causing the issue? Is there an official build Duet3d Bullseye version (I could not find one)?

            P.S. I also tried with "sbcExecutableArguments": "-file ../DuetLapse3/DuetLapse3.config",
            Same error.

            chrishammundefined 1 Reply Last reply Reply Quote 0
            • chrishammundefined
              chrishamm administrators @stuartofmt
              last edited by

              @stuartofmt Linux is quite strict when it comes to mode strings (first line in your script). If you encode Python scripts using CRLF line endings, Linux will attempt to start python3\r and not python3, so try to change the line ending to LF only. That should fix it.

              Duet software engineer

              stuartofmtundefined 1 Reply Last reply Reply Quote 0
              • stuartofmtundefined
                stuartofmt @chrishamm
                last edited by

                @chrishamm

                Thanks! I did not even look at line endings because its been fine up until this last round. Its the strangest thing - I have Visual Studio Code set to default to unix EOL . For some unknown reason, these files were reset to CRLF.

                Possibly during a file transfer (something I need to look into).

                Again - THANKS!

                chrishammundefined 1 Reply Last reply Reply Quote 1
                • stuartofmtundefined stuartofmt marked this topic as a question
                • stuartofmtundefined stuartofmt has marked this topic as solved
                • chrishammundefined
                  chrishamm administrators @stuartofmt
                  last edited by

                  @stuartofmt Check your git settings, maybe that changed it on commit.

                  Duet software engineer

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA