Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

ImportError:python2.7/dist-packages/RPIO-2.0: undefined symbol: makedev

I have a problem with RPIO. I am running a face recognition using OpenCV python on Raspberry Pi 3B+. pi@raspberrypi:~/facerec-pi/code $ sudo python capture-positives.py Tradeback (most recent ...
1
vote
1answer
34 views

Dash/Plotly webserver not working on raspberry Pi, working on mac

I am trying to chart real time data from a Raspberry Pi to a web server. In this case I am using dash (https://dash.plot.ly/live-updates) to do this. I am currently testing my dash web browser on ...
0
votes
1answer
51 views

Run command on Pi based on ping result [closed]

I am very new to this stuff. Trying to see if anyone has accomplished what I am looking to do. I would like to have a ping to my android phone running on my Raspberry Pi. When it gets a response I ...
0
votes
0answers
9 views

Seek backwards with Python2-mpd

I installed Python2-mpd on archlinux, and would like to have an option to seek song backwards. But calling this line in Python gives me an error: client.seek(2,-30) mpd.CommandError: [2@0] {} ...
0
votes
1answer
52 views

Pigpio on callback get value

I currently have some code that I found that constantly outputs a value from a digital caliper. However, I want to modify this so that it is inside a function that can return that is returned from ...
0
votes
0answers
30 views

how to make python program executable in rpi

I have a python code which works well in raspberry on boot. I need to hide the code and make the user to non editable. The program have a kivy ingerface and the program starts on start up. Even though ...
0
votes
0answers
57 views

capturing video stream using piCam

i'm trying to capture the video stream using piCam. but i get this warning and the execution stops this the code: this the code I used: import numpy as np import cv2 cap = cv2.VideoCapture(0) cap....
1
vote
3answers
94 views

Reading time off of a cellular modem with python 2.7 and pyserial

TL;DR: I need to read the time off of my Hologram Nova USB cellular modem on /dev/ttyACM0 and update the system clock after the pi restarts. I'd like to do it in Python but it isn't reading the ...
2
votes
2answers
409 views

Print PDF files using Python code

This Python code works in Windows but does not work in Raspbian. How do I print PDF files using the Raspberry Pi? import os fd = os.startfile("/home/pi/Desktop/a.pdf", "print")
0
votes
0answers
33 views

rasberrypi gui using python 2.7

I'm trying to host run a GUI program on my pi using ssh. but I get this error: App(Tkinter.Tk(), "window name") NameError: name 'Tkinter' is not defined. however when I type "import Tkinter" in pi ...
0
votes
0answers
286 views

Read registers of Power Meter w/ RPi using Pymodbus TCP

I'm trying to monitor the power usage of multiple devices and store that data in a database using Python. I am connecting my RPi 3 to the power meter via an Ethernet cable and using Modbus TCP. To use ...
0
votes
1answer
102 views

Cannot detect ttyS0 in python RPi3b+

I'm using the Rpi 3B+ and understand the hardware uart is used by the bluetooth. I'm OK to use the other uart I've followed several threads and believed I've done all I can. Enabled the Uart in ...
0
votes
0answers
238 views

Error: could not locate runnable browser

I am using Raspberry Pi3 B+, I have a problem with webbrowser module, when i run my Python 2 Program Code: import webbrowser url = "youtube.com" chrome_path = "/home/pi/Desktop/Chromium Web Browser" ...
0
votes
3answers
858 views

Python script not running on boot from /etc/rc.local

I'm trying to ran python 2.7 script on boot, and did following: sudo nano /etc/rc.local Modified file before exit 0 with line: sudo /usr/bin/python /home/smart-scale/scoreboard/main.py & That ...
0
votes
0answers
289 views

Cannot install install tensor flow on raspberry pi 3b

i am running into an error when i try to install tensor flow using pip on my raspberry pi 3b+. here is the error message: Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/...
1
vote
2answers
70 views

TSL2561 Lightsensor with Python 2.7 and rpi.gpio

I want to add a TSL2561 to an existing (Model B, Wheezy) system that is built on Python 2.7, and uses some other GPIOs (not using I2C), with the module rpi.GPIO. The TSL2561 python library has a ...
0
votes
2answers
122 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
136 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 ...
1
vote
2answers
13k 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
152 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
87 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
2k 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
37 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
277 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
64 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
2k 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
902 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
3k 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
57 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 ...
1
vote
0answers
25 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
72 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 ...
-1
votes
1answer
253 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
140 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. ...
2
votes
2answers
371 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 ...
1
vote
1answer
51 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
418 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
1k 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
868 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
1answer
440 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
1answer
167 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
473 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
2k 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
1answer
2k 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
1k 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 ...
2
votes
1answer
459 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
2k 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
513 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
3answers
2k views

Convert .xlsx to .pdf [closed]

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
103 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
231 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 ...