Quantcast
Channel: Raspberry Pi Forums
Browsing all 1225 articles
Browse latest View live

Python • Using multiple languages/venv in a script

I am relatively new to programming but have encountered a problem when it comes to using multiple libraries (Adafruit and rpi) I am programming on a raspberry pi 5 and have 2 programs that work great,...

View Article


Python • Re: Using multiple languages/venv in a script

There are many possible solutions.You could use one venv for your Sensors and the Motor.If it's not possible because of incompatility of libraries, you could use IPC (inter process...

View Article


Python • Python on RPi 4

I have worked with Python a lot in Windows PC. I am wondering how do we run Python on RPi 4. Do we need any operating system (Raspberry Pi OS) as a baseline to install Python and run Python script...

View Article

Python • Re: Python on RPi 4

Yes, you need an operating system. Raspberry Pi OS Bookworm is recommended. Python is pre-installed.https://www.raspberrypi.com/software/Statistics: Posted by rpiMike — Mon Jan 13, 2025 11:45 am

View Article

Python • Re: Keep getting this error message

Incidentally, I just put this string:RuntimeError: Cannot determine SOC peripheral base addressinto the search bar of this forum, and got lots of hits - some of which looked interesting.OP should do...

View Article


Python • Accessing/Connecting to hostinger's mariadb database

Has anyone tried to connect or access remotely via python running on raspberry pi the database (mariadb) from hostinger?I get these error message:Error connecting to MariaDB Platform: Access denied...

View Article

Python • Re: Accessing/Connecting to hostinger's mariadb database

You are likely further ahead Googling "mariadb.OperationalError: Access denied for user" https://www.google.com/search?q=%22mari ... e&ie=UTF-8 and/or asking on the MariaDB Community...

View Article

Python • Re: GPIO busy in Flask Service

Thank you for your suggestions!I'm now only using the RPi.GPIO library and re-coded the buttons. Now everything works as desired.Statistics: Posted by LuMa97 — Tue Jan 14, 2025 5:13 pm

View Article


Python • Re: Importing picamera2 causes imshow hang

I am having the same issue. As soon as I import picamer2, imshow hangs indefinitely until I kill the script. I went and did a force reisntall of opencv through pip and pyhthon3-picamer2 through apt...

View Article


Python • Python 'terminal' module

Is it possible to install the python module called 'terminal' in the rpi version of python3 ?'Terminal' provides a screen based command line interface for python applications.It is quite difficult to...

View Article

Python • Re: Python 'terminal' module

Do you mean the REPL, if so just launch Python and you are at it.If you mean a module to use in your program, then search PyPI https://pypi.org/search/?q=terminalStatistics: Posted by bensimmo — Wed...

View Article

Python • Serial communication between arduino and python pausing when Guizero...

Hi everyone,Excuse me if a similar topic has been answered before, as I am a fairly inexperienced programmer, but I have looked through the forums and been unable to understand/apply any previous...

View Article

Python • Reading/Writing to USB Drive

In Windows I have experience with making a GUI in Python in which I was taking data from a Microcontroller through UART and saving the data as text file after processing. This was all done in Python....

View Article


Python • Re: Reading/Writing to USB Drive

In Windows I have experience with making a GUI in Python in which I was taking data from a Microcontroller through UART and saving the data as text file after processing. This was all done in Python....

View Article

Python • Re: Managing (very) complex Dictionary structures.

i would pretty print this dictionary to a file for clarity.Also some browsers will do this if you call the api URL directly (you may need a plugin)curtStatistics: Posted by Curt Timmerman — Wed Jan...

View Article


Python • Re: Serial communication between arduino and python pausing when...

Is that Arduino anything to do with the "ClearCore I/O and Motion Controller" ?Looking at the python code we see Code: text.repeat(1, update_text) which is every millisecond - did you want...

View Article

Python • Python stops working but shows no error message

I have a pi that has been running a script for probably 2 years with minimal issues. The script is using gpiozero to monitor a few switches. When the switches change state, it does a requests.post to...

View Article


Python • Re: Python stops working but shows no error message

Can’t really help until you can post your code.Do you test for internet connection before calling URLs? Do you have retry’s? Do you trap and log exceptions?How long are the cables to the...

View Article

Python • Re: Advice on Building a Spirit Animal Finder Tool with Python for...

When you design a Spirit Animal Finder, you can arrange the logic in this way: create a clear relationship system to link the user’s input to the property of spirit animals. Such input may be the...

View Article

Python • Re: RPI5 runs out of memory while running python script

Sounds awfully like a memory leak (quite a bad one at that).I'm not a python programmer, but perhaps posting your script will help others diagnose where the fault is.Use [CODE] [/CODE]...

View Article
Browsing all 1225 articles
Browse latest View live