Questions tagged [python-3]

Use this tag when referring to the Python 3 language. This can include discussions about specific features unique to the language or perhaps when referring to software that requires Python 3 in order to function. Note that general programming questions are often better suited to Stack Overflow; use this tag only where directly relevant to the Pi.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

how to play the multimedia as long as the rfd tag is placed on mfrc522 sensor and stop as the user takes the card away

I am working on a project where the user can play media using rfid tags. The file name is written into it when user places the card on the MFRC522 sensor, the corresponding media starts playing. I ...
0
votes
0answers
16 views

Interfacing Python code with C code for Ultrasonic Sensor Use (PCA9685/L298N)

I am working on a project for school and can't get this to work. The professor doesn't quite know why either. The project is done with C code using a Raspberry Pi 3, two motors controlled with a L298N ...
1
vote
1answer
31 views

Trying to debug why the magnetic sensor of my MPU9250/6500 Gyroscope Acceleration Magnetic Sensor won't connect via I2C but all the other sensors will

I am trying to debug why the magnetic sensor of my MPU9250/6500 9-Axis 9 DOF 16 Bit Gyroscope Acceleration Magnetic Sensor IIC/SPI won't connect to my Raspberry Pi 4+, but all the other sensors will. ...
0
votes
1answer
13 views

Understand the plumbing behind running RasberryPI code from Freenove in Python

I have downloaded some pre-made code from Freenove - https://github.com/Freenove/Freenove_Ultimate_Starter_Kit_for_Raspberry_Pi Freenove uses WiringPi. So I downloaded WiringPi and ran build. Question ...
-2
votes
0answers
22 views

i stuck on this error continuously on my raspberry pi with pi camera [closed]

i get this error on my thonypython with my picamera. i don't understand what is the reason. any type of help will be very appreciating.
0
votes
0answers
18 views

Connecting to Azure SQL using Service Principal

I'm using Python 3.8, and want to connect to Azure SQL Server, authenticating using a service principal. I'm able to get the service principal's token using msal. Using the Microsoft ODBC driver, I'm ...
1
vote
2answers
35 views

Take Serial (tx/rx GPIO) Input with script running at startup

I've run lots of cron jobs and have set up scripts to run at startup. I assumed this would be an easy task because maybe I'm missing something. I have a script that when it sees a specific message ...
-1
votes
1answer
25 views

ImportError with Google Text-to-Speech(gTTs)

I am getting an error when trying to import gTTs for python 3.8. I have to use 3.8 for my project I am working on. ` I entered in from gtts import gTTs when I do this I receive an erro saying: ...
1
vote
0answers
44 views

GPIO pins not working properly

i've recently started a small project where i want to controle an LED-strip with an webapp using a respberry pi. While the webapp works perfectly fine, i ran into a problem with my pi zero w. Since ...
0
votes
0answers
35 views

Install pygame with miniconda3 on Raspberry Pi 4

Probably the solution to my problem is easy, I just do not have enough knowledge to solve it. I have a Raspberry Pi 4 with Raspberry OS on it. It comes with python 2.7 and 3.7 preinstalled and they ...
0
votes
1answer
23 views

Python - How to automaticly open first available serial port (COM/tty) [closed]

I am new at Python and I want to learn serial communication between Raspberry and other devices like PC, arduino, sensors... I often plug and unplug devices like arduino, FTDI, etc. to COM port... I ...
0
votes
1answer
26 views

Error when installing acconeer-python-exploration

I am trying to install this on my Pi https://github.com/acconeer/acconeer-python-exploration . There are some requirements written in the file requirements.txt that need to be installed first. I've ...
0
votes
0answers
19 views

Minecraft Raspberry Pi Player Position

the following code shows an if statement under a while loop where its getting the player position every time the player isn't at the specific block but when the the player goes on the specific block ...
-1
votes
1answer
35 views

What's the best way to remote control a Raspberry pi - powered robot? [closed]

I'm going to build a robot powerd by raspberry pi and i wnat to control it remotely, the principal tasks that need to have a remote exchande of data is: the streaming of 3 cameras the monitoring of ...
1
vote
0answers
44 views

Installing PyQt5 for Python 3.6.2 on RPi has missing file errors [closed]

I am trying to install PyQt5 on an RPi 4/ 4GB for use with the Oasis 3DP controller software: https://hackaday.io/project/86954/instructions?page=2 To do so I've had many problems trying different ...
0
votes
0answers
13 views

ltp305 Dot Matrix Python Library not allowing me to use display.set_character()

I am trying to display a number on a Dot Matrix ltp305 display that increases with each button press, enabled by the pressing of a normal button connected to the GPIO. I am sure everything is ...
-1
votes
1answer
32 views

Programmable ws2812 LED fail to light up on Pi Zero

I have hooked up a programmable ws2812 LED . The Datasheet says "Default power on does not light up" Using the hook up guide and a breadboard I have a single LED where ... DIN is attached ...
0
votes
0answers
89 views

AttributeError: 'NoneType' object has no attribute 'send' for my LED on off code through blynk

I am trying to run a cod for LED on and off through blynk app but every thime it is showing this error: AttributeError: 'NoneType' object has no attribute 'send' my code is import RPi.GPIO as GPIO ...
0
votes
1answer
38 views

Python print output not shown in Thonny (version 3.3.5), Python 3.7.3

When running program below, the first line ("Hello World") is shown in the shell output. Also, the Bluetooth connection is working fine (I can send "0" and "1" and they ...
1
vote
0answers
27 views

Redirecting log entries - where have I gone wrong

On a Pi Zero, I have two python scripts set up as systemd services. Each has a .service file in /etc/systemd/system. Each has a .conf file in /etc/rsyslog.d that is intended to redirect syslog ...
0
votes
1answer
24 views

Issue with installing Circuit-Python-GPS along with Blinka — incorrect version of Python

I am using a Raspberry Pi 3 B+ with nthe latest version of Raspbian (version 9). I have recently purchased the Adafruit Ultimate GPS Breakout for a project that assists Blind users around their ...
-1
votes
1answer
34 views

Can't connect to pigpio at localhost(8888) Can't create callback thread. Perhaps too many simultaneous pigpio connections

Have connected DHT11 to Rpi4. VCC--pin 1 datapin--gpio4 Ground pin--pin 6 It works fine fine but after giving the result for few times then I get this error. New to pigpio please do help me figure out ...
0
votes
0answers
55 views

Error when trying to run python scripts

I've been trying for a while now to run python scripts and everytime i try i get an error saying some package is missing. My conda environment path is set to: root /home/pi/miniconda3 where root is ...
0
votes
2answers
167 views

Raspberry Pi DHT 11 sensor not working.I get None None

Have integrated Raspberry pi4 with a DHT sensor. The data pin is connected to pin GPIO 26 Have tried connecting the VCC to both 3.3V and 5V Have tried with both Adafruit_DHT.DHT11 and Adafruit_DHT....
0
votes
0answers
86 views

What is ConnectionError Failed to establish a new connection: [Errno -2]?

I am running a 6 script and they are running at different timings using systemd service and timer. Each script access the same url at least once. When I check the log file of some scripts, they are ...
0
votes
1answer
33 views

Shutting down a LED when a script fails

I have a python3 script which is started by systemd automatically on boot. This script turns on a green LED to signal that the script has started. Now I want the LED to turn off if the script fails/...
0
votes
2answers
42 views

Controlling a light with two inputs (PIR and a momentary switch)

I am new with Python and not sure how to integrate the following. I have a setup where I am trying to control an LED strip for under-counter lighting using python and GPIO-Zero. The PIR activates the ...
0
votes
0answers
47 views

PySide2 not seen by pip

I'm trying to install PySide2 on my RPi 4, and, although the installation was successful, pip3 doesn't recognise it. This then causes issues when installing other packages relying on PySide2. I ...
1
vote
1answer
194 views

Raspberry pi interfacing with AD8232 using python

I have already seen the other post but I want a python code through with I can connect my raspberry pi and ECG sensor ad8232 I am totally new to raspberry pi interfacing so I don't completely ...
0
votes
1answer
49 views

RPi.GPIO: multiple buttons one callback function, ignore buttons while callback is executing

I have 4 buttons connected to my Raspberry Pi that call the same function when pressed. I'm using GPIO.add_event_detect to connect the buttons to the callback function. When one button press executes ...
0
votes
0answers
19 views

Trying to Run Python Scripts on the Pi remotely using bluetooth

I am trying to get a script that is currently on my Raspberry pi 3B+ to start using the Bluetooth on the Pi itself from my laptop. I have tried a few things, including pybluez (wouldn't run on my ...
0
votes
1answer
33 views

Raspberry pi cannot run an executable file created in Python

I' m new to Raspberry Pi and I created a file with the code: from tkinter import * from PIL import Image, ImageTk import board import busio from adafruit_as726x import AS726x_I2C import time import ...
0
votes
0answers
46 views

How can I make the Raspberry Pico not automount as USB storage while using Circuit Python

I am using Circuit Python on a Raspberry Pi Pico to give me hardware buttons for keyboard shortcuts. I am using Circuit Python as opposed to MicroPython because it has the USB_HID library. I don't ...
2
votes
2answers
75 views

How do I get Python 3 to work again on my Raspberry Pi?

I am running Raspbian on a Pi 3 that has one job: it runs a clock on a Sense Hat, from Python 3 source code. Recently I found I was unable to run my clock program, which generated an error stack that ...
1
vote
2answers
48 views

Problem running a Python3 script at startup with lxsessions

I have Raspbian Buster on a RPi4 and I was launching a Python3 based Kivy 2.0 app at startup. Since it is a GUI app that needs networking and bluetooth. The only way to make it work was an executable ...
0
votes
1answer
45 views

gpiozero button to raise SystemExit / gpiozero clash with GPIO.cleanup()

TL;DR: Since this is a long question I have the following problems: I'm looking for a good way to use gpiozero Button to raise SystemExit upon button press I have an imported module to drive an E-Ink ...
0
votes
1answer
38 views

Can turicreate python library be installed on raspberry pi?

Hello all, Recently I am trying to install turicreate library on my raspberry pi 3 model B+ by following all the required steps to be done for installation for operating systems like Ubuntu which is ...
0
votes
1answer
361 views

ModuleNotFoundError: No module named 'PIL'

I am having issues trying to run a python file that works with an rfid headder i have on my pi 0. Im brand new to the pi so it might be that ive not done something simple but im still stuck. I have ...
0
votes
0answers
12 views

ORB object tracking on Raspberry pi

I am new to Rasberry Pi and OpenCV but I got a project to make a target detection tool using ORB from openCV with raspberry pi I'm using the Raspberry Pi 3 Model B and the Raspberry Pi Camera V2 8MP ...
0
votes
0answers
18 views

How to full screen the app window in Rpi 7in TFT

I'm currently working on an app for rpi using kivy that will be displayed in a 7in TFT. I used the 7in TFT resolution as window size (800,480) I am developing the code in windows pc since coding it in ...
0
votes
1answer
52 views

Sonic Pi won't play sound from remote python script

I am using Sonic Pi 3.3.1 on my Windows PC and a Python script(Python3.7.2) on my raspberry pi(Raspbian Buster) that detects distance from an HC-SR04-Ultrasonic Sensor .The program then creates a tune ...
0
votes
2answers
204 views

Update system python 3.7.3 to python 3.7.9

Right now the python3 version is 3.7.3 on my Raspberry Pi 4. Generally, it is a bad idea to mess with the system Python (I've understood), but since I use 3.7.9 normally, I would like to have that ...
0
votes
0answers
29 views

Is there a way to get PiCamera's actual framerate?

I would like to know the camera's actual frame rate. This might seem trivial, but I could not find an obvious solution. I'm using PiCamera 1.13 with Python 3.7.3. My current approach is with ...
0
votes
0answers
98 views

usb mic works in python speech_recognition test but not in practice

System and Devices Raspberry Pi Zero W running on Raspbian GNU/Linux 10 (buster) usb microphone (this one) Python 3.7.3 What's working: I can run python3 -m speech_recognition on the raspberry pi, ...
-2
votes
1answer
22 views

flask_ask won't import after proper installation

I'm trying to use the flask_ask library however I for some reason can't get it to work. Whenever I try to reinstall flask-ask by doing pip install flask-ask I am given the same thing below so I think ...
0
votes
1answer
28 views

Using Mu editor on RPi for Python version 3.7. Copying script written (and worked) on 2.7 and getting syntax error on script

Getting syntax error and "cannot understand this line, check for missing characters" statement for this line: GPIO.setup(LED1, GPIO.OUT) plus a continuation line under-indented for visual ...
0
votes
1answer
137 views

Running python 3.7 on miniconda on raspberry pi

I want to use python 3.7 in raspberry pi through miniconda but surfing, I got to know that miniconda provides python version upto 3.4. Some sources said to use berryconda, which I installed but still ...
0
votes
0answers
24 views

I'm on a windows computer but I'm coding with mcpi and I was wondering how I'd put custom commands

I'm on a windows computer but I'm coding with mcpi and I was wondering how I'd put custom commands. I cannot find any tutorials and no forums are talking about it. Can someone please point me in the ...
0
votes
1answer
34 views

Python Sockets ErrorConnectionRefused: Errno111 (only on Pi)

So I made a simple client / server script using python sockets, and it's been working great on my PC. I decided I'd try to move the server over to a raspberry pi so it would be dedicated, and it's not ...
0
votes
1answer
32 views

import Spacy on RPI in Pycharm and other IDE gives error

I successfully installed Spacy using pip install spacy and alternatively through Pycharms virtual env, but when I import spacy in my program it's giving me the following error; home/pi/....

1
2 3 4 5
11