Anafi Olympe SDK cannot be used on overlayfs

I activated overlayfs on the PI for SD card protection and as it seems now there is a problem with the Olympe SDK. It doesn’t run on r/o file systems.

This is what I get if I activate the pyenv and launch Python in order to import olympe.

And suggestions?

pi@raspberrypi:~/anafi-pi $ source ~/code/parrot-groundsdk/products/olympe/linux/env/shell
pyenv: cannot rehash: /home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/shims/.pyenv-shim exists
gawk: cmd. line:3: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/bin/wsdump.py FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/site-packages/distutils-precedence.pth FNR=1) fatal: print to "standard output" failed: No space left on device
gawk: cmd. line:5: (FILENAME=/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/pyenv.d/exec/pip-install-target.bash FNR=1) fatal: print to "standard output" failed: No space left on device


(olympe-python3) pi@raspberrypi:~/anafi-pi $ python
Python 3.9.5 (default, Aug 11 2022, 13:55:33) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import olympe
ModuleLoader unhandled exception
Traceback (most recent call last):
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/module_loader.py", line 74, in add_package_root
    self.enums[root] = ArsdkEnums.get(root)
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/arsdkng/enums.py", line 438, in get
    ret = ArsdkEnums(root)
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/arsdkng/enums.py", line 448, in __init__
    self._proto = ArsdkProto.get(root)
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/arsdkng/proto.py", line 201, in get
    ret = ArsdkProto(root)
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/arsdkng/proto.py", line 257, in __init__
    self.parse_protos()
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/arsdkng/proto.py", line 504, in parse_protos
    with tempfile.TemporaryDirectory() as tmp_dir:
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/tempfile.py", line 779, in __init__
    self.name = mkdtemp(suffix, prefix, dir)
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/tempfile.py", line 348, in mkdtemp
    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/tempfile.py", line 118, in _sanitize_params
    dir = gettempdir()
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/tempfile.py", line 287, in gettempdir
    tempdir = _get_default_tempdir()
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/pyenv_root/versions/3.9.5/lib/python3.9/tempfile.py", line 219, in _get_default_tempdir
    raise FileNotFoundError(_errno.ENOENT,
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/pi/anafi-pi']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/__init__.py", line 32, in <module>
    from .controller import Drone, SkyController
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/controller.py", line 32, in <module>
    from .arsdkng.cmd_itf import Connect, Disconnect, Connected, Disconnected  # noqa
  File "/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/arsdkng/cmd_itf.py", line 42, in <module>
    from olympe.enums import drone_manager as drone_manager_enums
ImportError: cannot import name 'drone_manager' from 'olympe.enums' (/home/pi/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/enums/__init__.py)
>>> 

If pyenv is the problem, would it make sense to try an installation w/o using pyenv at all? The PI is dedicated to the Anafi control script, I won’t necessarily need a virtual environment here.

I solved this. But since I’m just talking to myself here, I see no need to provide information.

Just this: It’s hackish and dirty

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.