DotStar Pi Painter HELP !
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
DotStar Pi Painter HELP !
Hi everyone,
I'm french photographer. I started this project : https://learn.adafruit.com/dotstar-pi-p ... y-pi-setup
I follow all steps to set-up the raspberry (raspberry pi 2 + raspberry Pi OS Lite 32).
But after doing: pyhton 3 DotStarPiPainter.py
I have an error message:
python3: can't open file '/home/lightpainting/DotStarPiPainter.py': [errno2] no such file or directory.
Can you help me?
Merci beaucoup :)
I'm french photographer. I started this project : https://learn.adafruit.com/dotstar-pi-p ... y-pi-setup
I follow all steps to set-up the raspberry (raspberry pi 2 + raspberry Pi OS Lite 32).
But after doing: pyhton 3 DotStarPiPainter.py
I have an error message:
python3: can't open file '/home/lightpainting/DotStarPiPainter.py': [errno2] no such file or directory.
Can you help me?
Merci beaucoup :)
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
Can you try typing the following from where you had run the python command?
The command you had used to launch the program has typos, but if I can see the full path I might should be able to correct it for you.
Code: Select all
pwd
ls *.py
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
Thank you for your reply.
I typed your instructions.
The console displays :
/home/lightpainting
The console displays :
ls: cannot access '*.py' : No such fileor directory
I've joined a screenshot at this post.
I typed your instructions.
Code: Select all
pwd
/home/lightpainting
Code: Select all
ls *.py
ls: cannot access '*.py' : No such fileor directory
I've joined a screenshot at this post.
- Attachments
-
- PXL_20230907_132905639-web.jpg (440.3 KiB) Viewed 1266 times
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
Thank you.
It looks like there is no code there. At least not a python script.
Based on the guide instructions you should have the script here.
It looks like there is no code there. At least not a python script.
Based on the guide instructions you should have the script here.
Code: Select all
cd DotStarPiPainter
python3 DotStarPiPainter.py
Were you able to follow all the steps on this guide page? There are several components to install.If all goes well, nothing should happen…it’s waiting for a USB drive to be inserted. Plug in a USB flash drive with one or more images on it, and after a moment you should see it print a message that it’s loading and processing an image. Fantastic! Press Control+C to break out of the program and we’ll do some final setup.
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
Thank you for your help. I have entered your orders. I can run the python script fine. Unfortunately, I have an error. :(
Traceback (most recent call last):
File "/DotStarPiPainter.py", Line 48, in <module>
from lightpaint import LightPaint
ImportError: /home/lightpainting/DotStarPiPainter/lightpaint.so: undefined symbol: __pow_finite
I finded an post on this forum where this problem is mentioned : viewtopic.php?t=185938&start=15
------
For what it's worth, thought I'd report back on some findings.
Application was failing using RPi Lite (32 bit) 10/30/21 release.
Application runs using RPi Lite (Legacy) 2/12/21 release.
Not sure why, but no errors.
Problem I'm still working on its that the app recognizes my usb drive when I plug it in, but finds zero files (I added some code to spit out how many).
------
If i understand, I have a problem with my OS version ! I will try to reinstall my raspberry whith RPi Lite (Legacy) : https://www.raspberrypi.com/software/operating-systems/
I will share my experience on this post.
Traceback (most recent call last):
File "/DotStarPiPainter.py", Line 48, in <module>
from lightpaint import LightPaint
ImportError: /home/lightpainting/DotStarPiPainter/lightpaint.so: undefined symbol: __pow_finite
I finded an post on this forum where this problem is mentioned : viewtopic.php?t=185938&start=15
------
For what it's worth, thought I'd report back on some findings.
Application was failing using RPi Lite (32 bit) 10/30/21 release.
Application runs using RPi Lite (Legacy) 2/12/21 release.
Not sure why, but no errors.
Problem I'm still working on its that the app recognizes my usb drive when I plug it in, but finds zero files (I added some code to spit out how many).
------
If i understand, I have a problem with my OS version ! I will try to reinstall my raspberry whith RPi Lite (Legacy) : https://www.raspberrypi.com/software/operating-systems/
I will share my experience on this post.
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
Good find, but that forum thread you linked to is a 2 year old post so the Legacy Rpi Lite build 2/12/21 release has been replaced with a newer Legacy Lite 3/5/23.
Lets start with what version of Pi OS do you currently have installed? Please share the output from this command.
As the guide you have been following indicates you need to recompile the library.
FWIW, I did have to remove some hard coding in the source.
* lightpaint.c - change from including python3.5 to any python release.
* Makefile - added compiler flags to include python3.9 folder
I've attached the library and modified files for you to try with your current Pi OS install.
Lets start with what version of Pi OS do you currently have installed? Please share the output from this command.
Code: Select all
cat /etc/os-release
I went ahead and built it on my Pi4 running Bullseye. You can let me know if it works for you.thread you linked to is a 2 year old post so the Legacy Rpi Lite build 2/12/21 release has been replaced with a newer Legacy Lite 3/5/23. The current legacy build may work for you so please give it a try.
FWIW, I did have to remove some hard coding in the source.
* lightpaint.c - change from including python3.5 to any python release.
Code: Select all
#include <Python.h>
Code: Select all
CFLAGS = -fPIC -Ofast -fomit-frame-pointer -funroll-loops -I/usr/include/python3.9
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
I opened and issue with the DotStarPiPainter github repo about the source code needing to be rebuilt for Pi OS Bullseye and the suggested source changes (style).
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
Thank you for help !
I lanch this code :
My raspberry show :
I lanch this code :
Code: Select all
cat /etc/os-release
Code: Select all
pi@raspberrypi:~ $ cat /etc/os-releasepi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
Then, i apply your modifications in lightpaint.c et Makefile.
lightpaint.c - i replace
by
Makefile - i replace
by
Unfortunately, i have the same error when i launch DotStarPiPainter.py :
lightpaint.c - i replace
Code: Select all
#include <python3.5/Python.h>
Code: Select all
#include <Python.h>
Code: Select all
CFLAGS = -fPIC -Ofast -fomit-frame-pointer -funroll-loops
Code: Select all
CFLAGS = -fPIC -Ofast -fomit-frame-pointer -funroll-loops -I/usr/include/python3.9
Code: Select all
pi@raspberrypi:~/DotStarPiPainter $ python3 DotStarPiPainter.py
Traceback (most recent call last):
File "/home/pi/DotStarPiPainter/DotStarPiPainter.py", line 48, in <module>
from lightpaint import LightPaint
ImportError: /home/pi/DotStarPiPainter/lightpaint.so: undefined symbol: __pow_finite
- Attachments
-
- putty_2023-09-10_11-50-35.png (47.62 KiB) Viewed 1226 times
-
- putty_2023-09-10_11-39-46.png (21.09 KiB) Viewed 1226 times
-
- putty_2023-09-10_11-39-19.png (52.36 KiB) Viewed 1226 times
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
You made the correct changes, but you need to run the ‘make’ command (just once) before running the python script.
Code: Select all
make
Code: Select all
python3 DotStarPiPainter.py
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
Awesome ! The script works :) Thanks
But nothing happens when I plug in the USB stick.
99_lightpaint_mount and 99_lightpaint_umount are in the good directory.
But, i've not finded "MountFlags=slave" on the system file => /lib/systemd/system/systemd-udevd.service
But nothing happens when I plug in the USB stick.
99_lightpaint_mount and 99_lightpaint_umount are in the good directory.
But, i've not finded "MountFlags=slave" on the system file => /lib/systemd/system/systemd-udevd.service
- Attachments
-
- putty_2023-09-10_18-03-32.png (12.59 KiB) Viewed 1217 times
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
Show me that the mount / umount files are in the correct location. Your previous screen shot showed them in your home directory, but they need to be under the respective /etc/usbmount folders as the instructions show:
Run these commands to show me they are there:
Did you modify the system-udevd.service file? Let's see the content.
Code: Select all
cd DotStarPiPainter
sudo cp 99_lightpaint_mount /etc/usbmount/mount.d
sudo cp 99_lightpaint_umount /etc/usbmount/umount.d
Code: Select all
ls /etc/usbmount/mount.d
ls /etc/usbmount/umount.d
Code: Select all
cat /lib/systemd/system/systemd-udevd.service
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
I did the instructions :
I verify if files are in the correct location.
My raspberry shows :
I don't modify : /lib/systemd/system/systemd-udevd.service
Un grand merci !
Code: Select all
cd DotStarPiPainter
sudo cp 99_lightpaint_mount /etc/usbmount/mount.d
sudo cp 99_lightpaint_umount /etc/usbmount/umount.d
My raspberry shows :
Code: Select all
pi@raspberrypi:~/DotStarPiPainter $ ls /etc/usbmount/mount.d
00_create_model_symlink 99_lightpaint_mount
pi@raspberrypi:~/DotStarPiPainter $ ls /etc/usbmount/umount.d
00_remove_model_symlink 99_lightpaint_umount
pi@raspberrypi:~/DotStarPiPainter $
Code: Select all
pi@raspberrypi:~/DotStarPiPainter $ cat /lib/systemd/system/systemd-udevd.service
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Rule-based Manager for Device Events and Files
Documentation=man:systemd-udevd.service(8) man:udev(7)
DefaultDependencies=no
After=systemd-sysusers.service systemd-hwdb-update.service
Before=sysinit.target
ConditionPathIsReadWrite=/sys
[Service]
DeviceAllow=block-* rwm
DeviceAllow=char-* rwm
Type=notify
# Note that udev will reset the value internally for its workers
OOMScoreAdjust=-1000
Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
Restart=always
RestartSec=0
ExecStart=/lib/systemd/systemd-udevd
ExecReload=udevadm control --reload --timeout 0
KillMode=mixed
TasksMax=infinity
PrivateMounts=yes
ProtectClock=yes
ProtectHostname=yes
MemoryDenyWriteExecute=yes
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
IPAddressDeny=any
WatchdogSec=3min
- Attachments
-
- putty_2023-09-10_21-12-29.png (42.15 KiB) Viewed 1214 times
-
- putty_2023-09-10_21-11-07.png (13.07 KiB) Viewed 1214 times
- mikeysklar
- Posts: 16605
- Joined: Mon Aug 01, 2016 8:10 pm
Re: DotStar Pi Painter HELP !
It looks like you found another issue with the guide related to a Pi OS update.
Starting with Pi OS Buster the syntax has changed for getting usbmount to work.
Try the following.
In the [Service] section of the configuration file add this line:
restart udevd:
Now is your USB drive detected on insertion?
Starting with Pi OS Buster the syntax has changed for getting usbmount to work.
Try the following.
Code: Select all
sudo nano /lib/systemd/system/systemd-udevd.service
Code: Select all
PrivateMounts=no
Code: Select all
sudo systemctl restart systemd-udevd
- ludwig_pop
- Posts: 10
- Joined: Wed Sep 06, 2023 11:30 am
Re: DotStar Pi Painter HELP !
All works fine ! The script read only usb key fomated on FAT32.
Merci.
Merci.
- Attachments
-
- putty_2023-09-11_09-05-41.png (9.26 KiB) Viewed 1207 times
Please be positive and constructive with your questions and comments.