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-2.x]

To be used when a piece of code in a question is specifically related to any version of Python 2.

0
votes
2answers
58 views

Help running Python script from terminal as easily as I can with IDLE

I have a long script that runs several GPIO devices using both SMBus and pigpio. It starts a thread to cycle through a series of screens on an OLED display, and then connects to Paho MQTT, and keeps ...
1
vote
1answer
36 views

same GPIO input signal on multiple raspberri's from one source

Im having 7 raspberri pi's 3 connected to 7 screens, running an python 2.7 app to download different images from google drive, every raspberry has different images. Geeqie is displaying those images ...
0
votes
0answers
11 views

Define the RFID reader port

I have 2 RFID and I would like to test it by there ports.. here's my code: import RPi.GPIO as GPIO rfid_reader_in = "/dev/hidraw0" #for RFID time in rfid_reader_out = "/dev/hidraw1" #for ...
0
votes
0answers
14 views

LQR Controller in Raspberry Pi C++ [on hold]

I am a newbie in Raspberry Pi and I don't know anything about Ubuntu, or ARM, etc. so please be patient in answering me and please, please guide me step by step. But I know how to run codes in C++ ...
0
votes
2answers
99 views

Installing Python 2.7

I am new to the Raspberry Pi, I have a project. I would like to work on Python 2 not Python 3. By default Python 3 is installed on my Pi. I want to change or remove this version and I want to ...
-1
votes
1answer
40 views

Mobile camera as a webcam for Pi 2 via USB

How can I use a mobile camera as a webcam for my Pi 2 text recognition idea by connecting the camera to the Pi using USB?
0
votes
1answer
29 views

Adafruit_Nokia_LCD module on Raspberry Pi Zero W

I'm stuck with this Adafruit module. I was able to install without errors on a Pi2, but when I tried to replicate on my Zero W the installation goes fine but then I cannot import the module ("...
0
votes
1answer
212 views

Problem installing pynput module for python 2

I am having issues installing one python 2 module (pynput). In fact I typed the command: sudo pip install pynput It works when I try the following snippet: import pynput but when I type: from ...
0
votes
1answer
22 views

SSH showing “connection failed” after installing “pip”

Python3, pip3 and python was installed before on my Raspberry Pi. Today I've successfully installed pip using below command: sudo apt-get install python-pip After few hours later I'm not able to ...
0
votes
1answer
54 views

error trying to set up RFIDIOT on raspberry

I am new to raspberry and python in general. I followed different guides to set up RFIDIOT (even the documentation and the installation guide on the repository on Github). So far, when I run pcsc_scan ...
-1
votes
1answer
32 views

Python script not accepting import function

I've been writing a simple python script, and I import the GPIO library, and the time library. I have the following code. print()'Importing GPIO library' import RPi.GPIO as GPIO print()"Importing ...
1
vote
1answer
328 views

This module can only be run on a Raspberry Pi!

I'm running daemon python file in virtualenv and has a Error: File "rpi_daemon.py", line 5, in <module> import RPIO File "/home/pi/python_virtualenv/local/lib/python2.7/site-packages/...
2
votes
1answer
177 views

Python 3 interpreter not recognizing a new installed package(python 3.5.3)

I'm new to this RPI world and also to python although I completed the basic courses I'm still getting used to this so I will appreciate your patience I'll try to express my self the best way. I ...
1
vote
1answer
1k views

“ImportError: No module named 'gspread'”

I installed gspread library and ran pip install gspread and followed all the instructions on this page. I've read many other threads on this issue and have checked that no file named gspread.py exists ...
0
votes
0answers
21 views

Help with multiple inputs and responding to how long the inputs have been active

I'm using python 2.7.13 on a Raspberry Pi 3 The goal of my program is to send an email when an input is received (input goes low and I'm using software pull-ups) and then send out another email with ...
0
votes
0answers
131 views

Chromium --no-sandbox error

hello there I also have a code in python like this webbrowser.get("chromium-browser").open("https://google.com") what will happen that the chrome will say that need to re-run the chrome with --no-...
1
vote
0answers
21 views

Vilvaldi can't found Python

hello there fam I am using a python code to open a specific link like this using a webbrowser module code is this: webbrowser.get("vivaldi").open('http://127.0.0.1/raspi/invalid.php?error=403') but ...
0
votes
1answer
36 views

What does it mean and what are the reasons for when a RPi3 cannot find a service?

I have a RPi3 which can successfully trust, pair, connect and even list the service UUIDs of a BLE device both via bluetoothctl and via Bluepy python library. But when it tries to 'get' that service ...
0
votes
1answer
95 views

how to solve this segmentation error problem

I am writing a basic code for a robot to follow the blue color and whenever I am running the code it gives that out put the y is :0 the x is :0 moving to the right moving forward Segmentation fault ...
0
votes
0answers
57 views

python 2.7 vs pyserial - no _port

I really have tried searching through all the forums. confusing. The makers of Roboclaw wrote their test pythons scripts (and Roboclaw class) with Python 2.7. As of now, will NOT work with python v3. ...
1
vote
1answer
199 views

Slow Video Processing

I installed OpenCV libraries in raspberry pi for my project "Air Hockey Robot" and I'm using python for video processing. I am using PS3 eye camera for video capture at 60 fps. But it seems that video ...
0
votes
0answers
260 views

opencv cv2.imshow doesn't work

I'm working a project that getting a video from usb camera on raspi for encode qr code. So I wanna display the current frame, but i am getting this error: <cv2.imshow('Current', frame) error:/...
1
vote
1answer
28 views

Can't use libgpod in python on Zero W

I have installed python-gpod on Raspbian lite Stretch, but can't get it to work. pi@raspberrypi:~$ uname -a Linux raspberrypi 4.14.30+ #1102 Mon Mar 26 16:20:05 BST 2018 armv6l GNU/Linux ...
1
vote
0answers
189 views

Play piano keys through Bluetooth LE and Midi

On the desktop Using my desktop Macbook I can successfully "remote-play" notes on my piano through the USB-Midi to Bluetooth adapter (Yamaha UD-BT01). First I pair the device through the Audio Midi ...
0
votes
2answers
460 views

Why would os.system('sudo pigpiod') fail silently, but only part of the time?

I'm trying to learn how to safely and reliably start and stop the pigipod DEOMON process from within a python script. If pigpiod happens to be running already, then this script is always successful. ...
2
votes
0answers
480 views

Recommended way for a python script to check NTP update status, and initiate an update if necessary?

I am writing a data logging python script and I would like it to find out if the system clock has been synchronized via NTP recently, and if not, to attempt to cause it to happen before proceeding. ...
0
votes
0answers
43 views

How can I get Waypoints information from Pixhawk and send it to Raspberry while mission is uploaded from mission planner?

I am working on a project using a fixed wings UAV. I want to perform RC override when UAV reaches certain waypoints. I have defined the waypoints and uploaded the mission to Pixhawk using Misison ...
0
votes
1answer
142 views

Frecuent missing data error on DHT11

First of all, as this question involves a raspberry, python, Rpi. Gpio module and hardware build, I thought this was the place for it. In the past I've done some work around Dht11 sensor and python ...
0
votes
0answers
130 views

Connecting Arduino UNO and RPI 3B through MAX485 with /dev/ttyAMA0 port

I am trying to setup a connection between Arduino UNO and Raspberry Pi 3 B through 2 sets of MAX-485 (5V version) while I can send data packets from the Arduino side successfully, I am not receiving ...
0
votes
1answer
147 views

Python requests.post - intermittent failure when connected to Huawei E5330 MiFi

I have a python script running on startup on a number of Raspberry Pis (model 3). The script watches a serial port for data from an air quality monitor then posts this data to a web server using the ...
0
votes
1answer
163 views

How do you put the serial values(from arduino) to a specific grid in Tkinter? (Python 2.7)

I tried to put values in the grids from a string. But the values are not showing or updating. How do you put serial values(from arduino) to a specific grid in Tkinter? When I run the code, no values ...
3
votes
3answers
845 views

Is it ok to remove all Python?

I have a Raspberry Pi 3 Model B and I installed Raspbian on it using NOOBS. I want to use Python 3.6 only. Is it ok if I uninstall both Python 3.5 and 2.7? Will there be no system problems? If I yes, ...
0
votes
0answers
114 views

Raspberry pi freezing after running python code for around 30 hours

I am pretty new to using raspberry pi. I am doing a project where i am using the pi and a python code to control temperature and humidity of a chamber using sensors and relays( to turn equipment on ...
0
votes
1answer
632 views

cannot open shared object file: No such file or directory

Here I am trying to import 'libEpsonFiscalDriver.so' file on a Raspberry Pi using Python 2.7. Here are my steps in python: import ctypes ctypes.cdll.LoadLibrary('/home/pi/odoo/my_module/escpos/lib/...
0
votes
1answer
808 views

Serial Communication in Raspberry pi 3 B+

I want to communicate between Raspberry pi 3 B+ and GSM GPRS A6. I tried and I am unable to send data to GPRS Module from Raspberry pi. Now, I know that GPIO serial port is disabled by default in ...
0
votes
0answers
137 views

APRS [TNC] on Raspberry. Problem with recording audio

I have a problem with program in Python2 which working good on my laptop (virtual box-debian) but not working on raspberry pi 3 model b (raspbian). It is a TNC which decoding APRS data frames. I have ...
2
votes
1answer
303 views

Using the UART GPIO pins on a pi 3 to output characters to a TI MSP430

I'm currently building a remote controlled motor driven robot that is taking USB remote input, and output said input through the UART TX pin to a Texas Instruments MSP430 launchpad, that is connected ...
0
votes
1answer
1k views

Using I2C commands in Python 2

I would like to add code to a Python program for my Pi (Raspbian Jessie or Stretch) which will do the equivalent of these command line commands: sudo i2cget -y 1 0x6b 0x05 sudo i2cset -y 1 0x6b 0x05 ...
1
vote
0answers
278 views

Using UHF RF READER (VM-5GA) with raspberry Pi 3

I am having trouble with configuring the serial communication of raspberry Pi 3 with Raspbian Jessie OS. I want to connect my UHF RFID READER to my raspberry pi 3. This UHF RFID reader has already ...
1
vote
2answers
730 views

Convert .xlsx to .pdf

I'm looking for a python module to convert a .xlsx excel file to .pdf. My excel file will have formatted cells and embedded images. Does any one have any recommendations?
0
votes
1answer
75 views

error with imapclient library in raspberry pi

I'm getting these errors while running a program: > Traceback (most recent call last): > File "parseIMAPemail.py", line 5, in <module> from imapclient import IMAPClient File "/usr/...
0
votes
1answer
145 views

Cron not finding necessary files to run .py file

I hope this is not a duplicate post however I have spent about 16 hours researching a solution for my problem and have not found it yet. I am attempting to run a python GUI that acts as an interface ...
-1
votes
1answer
1k views

Jessie: How to deal with Python open of /dev/ttyACM0 not sending RST signal like it does with /dev/ttyUSB0

For my data loggers I use Python to open a serial port to Arduino Nano or Uno units that perform voltage and temperature measurements. In operation, the Python program reads data from the serial ...
0
votes
1answer
131 views

“NameError: name 'L_R' is not defined” using GPIO.PWM inside a Class

I'm trying to create a class to define various led status using 3 leds. For some status only I need to use GPIO.output method, but in other cases I want to use GPIO.PWM method to create a blink effect ...
0
votes
2answers
906 views

Problem with python cec in raspbian stretch

I have rpi 1 model b with stretch installed. I want to use python cec library. First I tried to install it. sudo apt install python-libcec But fails to import cec :: Python 2.7.13 (default, Jan 19 ...
0
votes
0answers
344 views

How do I use HMC5883l compass with raspberry pi and python 2

So I’m currently working on a robotics project in python 2 with a raspberry pi and i bough a HMC5883l 3 axis electric compass. I have no idea how to use i2c, it’s super hard to find any documentation ...
0
votes
1answer
2k views

How to add Rpi.Gpio to pycharm

I'm developing an application which interacts with raspberry pi.I need to get the temperature and humidity sensor readings from raspberry pi, for that I wrote this code.(I'm using python 2.7) import ...
1
vote
2answers
610 views

Run two Python programs every 30 minutes

I have two Python 2.7 programs. When I boot the Raspberry Pi I want to run that programs automatically. I also want to very 30 minutes close that programs and run them again. I imagine that the best ...
1
vote
0answers
825 views

How to detect an empty stdout pipe in Python with subprocess

I'm experimenting with, or better trying to learn and understand, the subprocess modules using Python on a Raspberry Pi running Raspbain Jessie. In the code below I'm piping the Internet traffic for ...
0
votes
0answers
307 views

RPI Python vs C application speeds

I have developed a software in Python (2.7) that uses pigpio to provide a waveform signal to a GPIO that runs a transmitter circuit. The frequency of the transmitter pulse (primary signal) is less ...