Questions tagged [python-2.7]
Python 2.7 is the last major version in the 2.x series, and is no longer maintained since January 1st 2020. Use the generic [python] tag on all Python questions. Do not add this tag simply to convey the version of Python you're using, unless the question concerns an issue specific to Python 2.7.
python-2.7
265
questions
0
votes
1
answer
68
views
Having trouble displaying images on Pepper
In the code below, I've tried to display a photo on Pepper's tablet that was just taken by their camera, but I've been having issues.
import time
from naoqi import ALProxy
from src.common.ip_port ...
3
votes
1
answer
183
views
Unable to connect to cloud datastore from local legacy project based on python2.7 and django 1.4
I have a django==1.4 project (python==2.7) that I wanted to run and make some changes. I am unable to connect to cloud datastore from my local codebase. Right now, when I run the project using ...
1
vote
1
answer
69
views
Python json.dumps of a tuple with some UTF-8 characters, either fails or converts them. I want the encoded character retained as is
On my server, a Python script gets data from a database as a tuple. Then the script converts the tuple to a string (using json.dumps()) to be passed to the JavaScript script in the user's browser.
The ...
0
votes
0
answers
17
views
flask-sqlalchemy delete row not succeed?
I use flask-sqlalchemy as my orm. And I have a post_file request needs to response immediately. Thus, I use multiprocessing to forward the request to post_file_async. Here I need to delete some rows. ...
0
votes
1
answer
38
views
How to change numbers received from text file to integer
I used python script to read numbers form *.txt file and use that number for future works, but the number when I parse I am getting error "TypeError: int() argument must be a string, a bytes-like ...
0
votes
0
answers
87
views
how to run next js and python backend on local server?
i want to run a project on local host , where frontend is built with next.js and backend is built with python, i am attaching package.json file of frontend and backend,
package.json file of python ...
2
votes
1
answer
121
views
Is there a command line to enable Options > C/C++ Compiler > Language 1, select Auto (extension-based), in IAR for building (.cpp) file
I want to automatically build IAR project using python script and I want to enable Options > C/C++ Compiler > Language 1, select Auto (extension-based) but I am unable to find any command line ...
0
votes
1
answer
562
views
OpenAI API error: "You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0
I am currently working on a gpt content creator system, and as I am using Mac it does not let me migrate to newer OpenAI library or downgrade it. Could I replace the ChatCompletion function with ...
0
votes
0
answers
9
views
Emulator output log for startup failure
Estou tento problema ao coda o beeware. mais especificamente estou tentando rodar o briefcase run android porém estou tento erro.enter image description here
briefcase create android
briefcase build ...
-2
votes
2
answers
63
views
Get image from data looking like \x00\x00\x87
How do I create/get/open the image from a URL request when the response looks like this:
\x00\x00\x00 ftypavif\x00\x00\x00\ ... \x87"y~\x13 $%\\\xad ... xb5\xa07tR\x80
Much longer, of course.
An ...
1
vote
2
answers
127
views
Pylance in vscode cannot find system functions for Python 2.7
I have Python 2.7 installed on my computer and have correctly configured the path in vscode, but Pylance still prompts that it cannot find the system functions.
Due to some necessary reasons, I ...
0
votes
0
answers
12
views
How can I add timeouts for each iteration inside a python os.walk loop?
I have the following def that stats all the directories on a server:
def collectAllDirectories():
fullDirList = []
w = walk(parent_dir, topdown=True)
# Get a complelte list of directories ...
0
votes
0
answers
23
views
symbol not found in flat namespace '__PyTrash_begin
I was trying to compile a code with instalooter login when I am getting this error symbol not found in flat namespace '__PyTrash_begin. all the other errors are mostly same but the end package looks ...
0
votes
1
answer
118
views
Python 2.7 requirements won't install without virtualenv
I'm working on migrating away from a legacy Django 1.6 application that runs on Python 2.7. I still need to be able to run this project, which runs inside a Docker container.
The issue I'm facing is ...
-1
votes
1
answer
33
views
Python search for the errors in the JSON
Premise: those dictionaries are strings. Those are JSON with a bad format. I search for the errors inside those JSON and print them.
example 1:
input
{
"ced": {
"CED_PH2&...