Hello everyone, we want to build our own first SNAP. However, we are currently facing issues. When I execute the code inside the suitable environment, it is working OK. When I build the snap and install it on a virtual ctrlX CORE V2.4, I receive the following information via ssh: 2024-06-13T16:41:33Z systemd[1]: Started Service for snap application lincap.webserver.
2024-06-13T16:41:33Z lincap.webserver[10257]: /snap/lincap/x2/bin/main.py: 1: from: not found
2024-06-13T16:41:33Z lincap.webserver[10257]: /snap/lincap/x2/bin/main.py: 2: from: not found
2024-06-13T16:41:33Z lincap.webserver[10257]: /snap/lincap/x2/bin/main.py: 3: from: not found
: not found16:41:33Z lincap.webserver[10257]: /snap/lincap/x2/bin/main.py: 4:
: not found16:41:33Z lincap.webserver[10257]: /snap/lincap/x2/bin/main.py: 5:
2024-06-13T16:41:33Z lincap.webserver[10257]: /snap/lincap/x2/bin/main.py: 10: Syntax error: "(" unexpected (expecting "then")
2024-06-13T16:41:33Z systemd[1]: snap.lincap.webserver.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
2024-06-13T16:41:33Z systemd[1]: snap.lincap.webserver.service: Failed with result 'exit-code'.
2024-06-13T16:41:42Z systemd[1]: Stopped Service for snap application lincap.webserver. In these lines 1-3 I try to import from a local package from src.xmlrpc_server import XmlRpcServer
from src.servos import Servo
from src.control_functions import ControlFunctions Although I included the packages into the setup.py, they are not recognized. Maybe someone has a hint, thanks a lot! from setuptools import setup
setup(
name='appname',
version='1.1.0',
description='description',
author='me',
packages=['app', 'appdata', 'motion.core.fbtypes', 'robot.core.fbtypes', 'src', 'src.rtde'],
#src.rtde is used by python script inside the folder src
install_requires=['flask', 'ctrlx-datalayer', 'ctrlx-fbs', 'pyopenssl'],
package_data={},
scripts=['main.py', 'datalayerProvider.py', 'fbsFunction.py'],
license='Copyright (c) 2024'
) Here is the folder structure: my_project/
├── snap/
│ └── snapcraft.yaml
├── main.py
├── src/
│ ├── __init__.py
│ ├── module1.py
│ ├── module2.py
│ ├── rtde/
│ │ ├── __init__.py
│ │ ├── submodule1.py
│ │ └── submodule2.py
├── app/
│ ├── __init__.py
├── appdata/
│ ├── __init__.py
├── motion/
│ ├── core/
│ │ ├── __init__.py
│ │ ├── fbtypes.py
├── robot/
│ ├── core/
│ │ ├── __init__.py
│ │ ├── fbtypes.py
└── setup.py
... View more