Skip to main content

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
20 views

Get actual with foreign key Web2py

I have a data table with three fields. All of these three (3) fields are foreign key of others table. But I want to display the actual data. How can I work it out? For now, I can only display their ID....
Lycan's user avatar
  • 21
2 votes
2 answers
63 views

Change mantissa in scientific notation from 0-1 instead of 1-10

I want to format a number so that the mantissa is between 0 and 1 instead of 1 and 10 in scientific notation. For example; a=7.365 print("{:.6e}".format(a)) This will output 7.365000e+00, ...
Raheel Shaikh's user avatar
0 votes
0 answers
34 views

How to change the python version of a virtual enviremnet?

I am writing a Django React web app and I am required to install Dlib for a specific component to work (to install face_recognition library). However I am unable to do so because I used Python 3.12 to ...
Achira Silva's user avatar
1 vote
0 answers
23 views

Runing a script written for python2.7 using subprocess.run in a script written in python3.11

In my company there is a script: install.py that is written in python2.7. The issue I'm writing a script to run this script from my own python script which I've written in python3.11. In the beginning ...
Saar Katz's user avatar
-1 votes
0 answers
46 views

Python 2.7.5 argument not being passed [closed]

I have a script that an argument is being passed from the automation program so I know there are no issues with the wrong file being passed. I am running into an issue that if the argument matches a ...
Patrick Perea's user avatar
0 votes
0 answers
5 views

Can processing of request/grequest responses be run concurrently in Python2?

I'm writing a Python2 program that pulls a large amount of JSON data from a remote CouchDB database. The data is indexed by timestamp: I pass a startkey and an endkey, and the database returns all ...
lucs100's user avatar
  • 303
0 votes
2 answers
35 views

Converting python 3 to 2.7.5 F string to .formated

I learned all of my python on 3.0 and greater and come to find out the server that I need to put my script on is 2.7.5 which means no f strings. I am having issues converting my script from F strings ...
Patrick Perea's user avatar
0 votes
1 answer
20 views

Can I set up autocomplete in VS Code for Revit API stubs without having Revit installed?

In my office, I have a PC that does not meet the minimum requirements to install Revit. I want to use it just for writing my API codes in VS Code, so I can use them later on another PC with Revit ...
Redouane TEBBOUNE's user avatar
0 votes
0 answers
17 views

AttributeError when running unittest with coverage in Python 2.7 on WSL

I'm encountering an error while attempting to run unit tests with unittest and coverage in Python 2.7 on a Windows 11 system using WSL (Windows Subsystem for Linux). The error message suggests an ...
a_retr0's user avatar
0 votes
0 answers
59 views

How to move effector near a target object?

I am using Python 2.7 with naoqi to make the robot grab an object with both hands (either from the bottom or from two sides). As a first step I want to move an effector to one side of a perceived ...
Sam's user avatar
  • 378
-1 votes
0 answers
23 views

Getting microphone recording from Pepper robot: no output

I'm trying to get a recording from Pepper's microphones over a period of time. What I'm trying is basically this: audio_service = session.service("ALAudioDevice") audio_service....
voidonaut's user avatar
2 votes
1 answer
68 views

Is there a way to mock .strip() for unit testing in Python 2.7's unittest module?

I am using Python 2.7 for a coding project. I'd love to switch to Python 3, but unfortunately I'm writing scripts for a program that only has a python package in 2.7 and even if it had one in 3 our ...
Réka's user avatar
  • 133
0 votes
1 answer
24 views

boto 2.49.0 unable to load ECS Fargate task role credentials from instance metadata

I am working on getting a legacy application up and running. It is using Python 2.7, I have managed to get it Dockerized and deployed to ECS using Fargate. However the legacy code is using boto 2.49.0 ...
technik's user avatar
  • 55
0 votes
0 answers
33 views

Unable install python-ldap in python 2.7.9 on windows 11

I cannot install the required package because it needs Visual Studio C++ 9.0, which is no longer supported. Unfortunately, I can't upgrade my Python version because I need it for Odoo 8 development. ...
Bagas Muhammad Shaka's user avatar
5 votes
3 answers
85 views

Why is format() throwing ValueError: Unknown format code 'f' for object of type 'str' when I'm not inputting a string?

I am using Python 2.7. (Switching to Python 3 for this particular code is not an option, please don't suggest it.) I am writing unit tests for some code. Here is the relevant piece of code: class ...
Réka's user avatar
  • 133

15 30 50 per page
1
2 3 4 5
18