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
23 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
1answer
2k views

Displaying a continuously updating time stamp on a 10 minute video

My objective is to print a continuously updating time stamp on every second of a ten-minute video recording instead of one that updates every minute. I'm running the picamera module of python version ...
1
vote
3answers
1k 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
36 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
60 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
72 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
214 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
217 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
1answer
98 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/...
1
vote
1answer
305 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
27 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
1answer
373 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
389 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 ...
1
vote
3answers
67 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 ...
0
votes
0answers
41 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....
0
votes
2answers
10k 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 ...
2
votes
2answers
147 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
30 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
159 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
74 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
131 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" ...
2
votes
1answer
30k views

Send data from Python to Arduino through serial port

Should I keep Arduino IDE and Serial 9600 open to be able to recieve data sent from python code , Arduino is connected with pi 3 with serial communication ? tried to send data while the arduino IDE ...
0
votes
3answers
516 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 ...
1
vote
0answers
434 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 ...
0
votes
0answers
256 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
56 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 ...
1
vote
1answer
120 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
2answers
101 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 ...
0
votes
2answers
2k 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 ...
-1
votes
1answer
116 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?
1
vote
1answer
2k 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
2answers
950 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. ...
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
3k views

Remotely debug python code on pi using Eclipse in windows

I am new the raspberry pi and I have just started my python development on it. I have installed eclipse in windows along with pydev. I have even made a ssh connection from eclipse to pi so now I have ...
-1
votes
1answer
52 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
1k 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
748 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 ...
0
votes
0answers
55 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
0answers
115 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
49 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
2answers
778 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
357 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 ...
2
votes
0answers
749 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
161 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 ...
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
1k 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 ...
0
votes
1answer
3k 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 ...
2
votes
1answer
376 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 ...