Skip to content

FileNotFoundError: [Errno 2] No such file or directory: 'config.yaml' #605

@allexmail

Description

@allexmail

When trying to start main.py not from the installation directory, an error occurs "FileNotFoundError: [Errno 2] No such file or directory: 'config.yaml'"

To Reproduce

  1. Install the python virtual environment in /opt/USBmon/
  2. Download the source codes and unzip them into a folder /opt/USBMon/turing-smart-screen-3.5.0/
  3. Install the necessary libraries in the virtual environment.
  4. Make a configuration of your screen and save it.
  5. Run the main.py script and make sure everything is working: /opt/USBMon/bin/python3 /opt/USBMon/turing-smart-screen-3.5.0/main.py (Screenshot1)
  6. Open new terminal.
  7. Try to run the main script from the home directory: /opt/USBMon/bin/python3 /opt/USBMon/turing-smart-screen-3.5.0/main.py (Screenshot2)

Expected behavior
I expected to see the theme display on the USB screen.

Screenshots / photos of the Turing screen
Screenshot1
Screenshot2

Environment:

  • Smart screen model XuanFang 3.5, COM port: /dev/ttyACM0
  • Revision of this project 3.0.5, main
  • OS with version Ubuntu 24.04
  • Python version Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0]
  • Hardware Intel CPU

Additional context
There has already been such a problem, but it has been closed without a solution. My task is to launch the screen from the startup script, which, of course, is not in the installation directory of your program. Let me know if you need more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions