Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
0answers
1k views

Segmentation fault, running out of memory? PyQt5

I am programming code to display camera feed with my raspberry pi 3 and Raspbian. Strangely, sometimes the code shows the video and sometimes i get the Segmentation fault error. I used gdb to find ...
0
votes
1answer
3k views

Jessie: libEGL warning: DRI2: failed to authenticate

I'm developing an application using Python 3 / PyQt5. Everything seems ship-shape until I try to run the GUI (which is partially reliant on a live graph that is backed by pyqtgraph) on my Raspberry Pi ...
0
votes
0answers
568 views

PyQt5 on Raspberry Pi 2 Model B

After viewing the answer here I decided to ask the same question two years later: how can I install PyQt5 on a Raspberry Pi 2 Model B? I also followed a few other threads (like this one) which ...
-2
votes
2answers
62 views

Syntax Error in python code for read sensor data through url and store into drive in .csv format

I was writing a python script to collect data remotely from plc through URL and store those data into my drive in CSV format. I have used the urllib3 module to collect data from the remote device. The ...
1
vote
1answer
467 views

PWM object's ChangeDutyCycle method is not working

I have a motor class but I dont' know why this motor cannot change speed class Motor: def __init__(self, pos, line_status=0): def set_motor_gpio(_a, _b, _pwm): self._A = _a ...
0
votes
1answer
761 views

RuntimeError: No access to /dev/mem

I'm using the PXfmini with the raspberrypi3 for a project and I need to use mavros and python code. My operative system is Frambuesa. I created the catkin workspace and I tested the c++ file ...
1
vote
1answer
2k views

Problem with matplotlib

I am attempting to run some matplotlib tutorials on my Pi3 running Raspbian Stretch. I have installed matplotlib & numpy using pip3 When trying to run any of the tutorials I get an error ...
0
votes
0answers
145 views

After python3 script run I can't run any program anymore

From time to time when breaking a python3 program I encounter a very strange problem. To illustrate it I have taken the screenshot: Started program works (like the htop in the another terminal window)...
2
votes
0answers
3k views

Want to Read COM Port Data and Write into TKinter Text Window

Using Python3, I want to read data on a serial port and display it into a tkinter GUI text window (not only the shell). Pretend I am trying to make the equivalent of a serial port character display. ...
0
votes
1answer
321 views

Custom menu GUI

I am trying to make a retro gaming console with the Pi Zero W. The first thing I want to happen is a custom menu screen show up. I know how to make a custom Tkinter GUI but I want it to show up when ...
1
vote
0answers
397 views

IR Tracking Sensor (TCRT 5000 ) always gives led off as output

I am using a Raspberry PI3 Model B and TCRT 5000 sensor to monitor movement. I am using a Python script(Python3) to read the data from the sensor. Script used - #!/usr/bin/env python import RPi.GPIO ...
3
votes
1answer
411 views

Capture image when camera is not covered

I am very new to R Pi, but I know my Python. I am working on a project where I have an always running camera, that is kept in dark. What I need to do is to capture an image when there is light. (lets ...
0
votes
0answers
609 views

camera.capture() do not work - the image is hang up

I have a problem with simple code in python to capture the image, below you can find the script: from picamera import PiCamera from time import sleep camera = PiCamera() camera.start_preview() sleep(...
2
votes
1answer
2k views

Saving graphs using Matplotlib is very slow

I am trying to write a python Code snippet which creates 24 figures and 9 subplot and saves them in the directory. Its taking around 197 sec to create all the 24 figures and save them. This is ...
0
votes
1answer
203 views

Can't upload data from Raspbian to PHPMyAdmin server

I am trying to upload data from Raspbian to my web server which is PHPMyAdmin MySQL type. I am trying to do this using Python 3, as follows: import pymysql as ps con = ps.connect(host='ip address ...
3
votes
1answer
522 views

Best Python 3.5 library for playing mp3 file on Raspberry pi 0 W

I've already tried VLC library but the cpu reach 100% usage frequently during file playing, I've also the necessity to track the state of the playing so to know when the file is ended etc., Any ideas?
0
votes
3answers
239 views

Temperature logger

I have a resistance thermometer that outputs 4–20mA over 0–100°C. I can convert this to 1–5V with the use of a 250Ω resistor. My aim is to measure the voltage and scale it to the temperature and log ...
2
votes
2answers
480 views

How does Raspbian know it's been installed in a Pi or Compute Module?

I want to design a python script that would allow me to check whether it's currently in a standard Pi 3 or it's in a Compute Module 3. But I have no idea even on how Raspbian OS know itself is ...
0
votes
1answer
256 views

Dependencies fail to install, cannot install picamera on pi3

When I run apt-get install python3-picamera it fails with different dependency issues like: files list file for package 'libparams-util-perl' is missing final newline or files list file for package '...
0
votes
0answers
311 views

Direct control of GPIO pins using gpiozero without using Button or LED interface

Using gpiozero, is there a way to directly control the GPIO pins of the Raspberry Pi? I know gpiozero has objects such as Buttons and LED for input and output. However I would like to access the pins ...
0
votes
2answers
850 views

Six arduino-slaves (motor+sensor) on one raspi-master via USB

We are connecting six arduinos via an usb-hub to our raspi. Each of the arduinos will get analog data from one sensor and also control the movement of one motor. Thus we have an input and an output on ...
0
votes
0answers
35 views

How can i use the camera module V2 to see where my robot going and also use it for taking photo and video

I want to use my picamera whit python to see where my robot going and i want to use the camera also to take picture and video. The problem is that I don't what is the best way to do so. My plan is to ...
2
votes
1answer
615 views

Is there a problem with using deprecated os.popen?

I'm using os.popen() to run terminal commands in multiple projects. I keep reading that os.popen() is deprecated though and I should use Popen() instead, but I haven't been able to get Popen() to ...
5
votes
4answers
6k views

Do we need multiple versions of Python?

I am new to Linux and going through my installed folder I can see there are four different Python folders in the directory list. python python2.7 python3 python3.2 Do we need all the four versions ...