Skip to main content
The 2024 Developer Survey results are live! See the results

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
0 votes
0 answers
29 views

django project on macbook pro M1 pro crashed with illegal hardware instruction

environment: 16-inch,2021 cpu: Apple M1 Pro mermory: 16 GB os version: 14.4.1 (23E224) python version: 2.7.15 Heading i try to run "python manage.py runserver 0.0.0.0:8080", but i got ...
Qiuping Wu's user avatar
0 votes
1 answer
100 views

python2.7 - How to decode JSON without decoding the UTF-8 inside of it?

I need a function to decode UTF-8 encoded JSON. This function should take a UTF-8 encoded JSON string and convert it to UTF-8 encoded objects. The following code works: # helper function def ...
personal_cloud's user avatar
0 votes
1 answer
690 views

Unable to Install Python 2 on Parrot OS

I'm facing an issue while trying to install Python 2 on my Parrot OS. Whenever I run the command: sudo apt-get install python2 I receive the following output: `Reading package lists... Done Building ...
Kamran's user avatar
  • 1
0 votes
0 answers
9 views

shutil.make_archive works but throws Error 13 for /root

I have a script that collects various files into a directory structure than creates a final zip archive. The directory <dir> is located at /home/<user>/<dir> and I want it to create /...
Nosjack's user avatar
  • 101
0 votes
1 answer
36 views

install python2.7 on rehl 9 for legacy application

We have an legacy application running on old python version which is python 2.7 i tried installing 2.7 from source but failed to so with many errors Also tried using sudo dnf install python2.7 but it ...
shashank verma's user avatar
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 ...
lachlanPaul's user avatar
3 votes
1 answer
184 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 ...
Akif Hussain's user avatar
1 vote
1 answer
71 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 ...
Davide Andrea's user avatar
0 votes
0 answers
18 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. ...
haojie's user avatar
  • 673
0 votes
1 answer
40 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 ...
Sijith's user avatar
  • 3,850
0 votes
0 answers
90 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 ...
Ritu Raj's user avatar
2 votes
1 answer
130 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 ...
Alibaba's user avatar
  • 21
0 votes
1 answer
626 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 ...
Divine's user avatar
  • 31
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 ...
MF Maximo's user avatar
-2 votes
2 answers
66 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 ...
user984003's user avatar
  • 29.1k

15 30 50 per page