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
95,145
questions
1
vote
2
answers
144
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
126
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
34
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&...
0
votes
0
answers
26
views
SSL Error and InsecurePlatformWarning when installing packages using pip on Python 2.7
I'm encountering a problem when installing packages on Python 2.7 using pip. Despite repeated attempts, the installation fails with SSL errors and warnings about an insecure platform. For example here'...
-5
votes
2
answers
43
views
Unable to execute Python Script directly [closed]
I am unable to execute Python Script directly.
enter image description here
enter image description here
whereas path to Python Environemnt is as follows:
root@UbuntuDockerGuest-1:~# python -c "...
0
votes
0
answers
56
views
Pip from Python 2.7.10 installed via pyenv-win cannot install any packages
I installed pyenv-win to create virtual environments in windows. One of the environments I need requires Python 2.7.10. To create virtual environments for Python versions below 3.3 I need to install ...
0
votes
0
answers
23
views
Arcpy: Python stops ExportToPDF through list after some iterations
I am having the same issue mentioned here, where it gives the exact same error after the file loops through 3 iterations. there has been no solution to that post and hence asking it again.
I am ...
0
votes
0
answers
14
views
Python2 unable to pickle string
This link says that both normal and unicode strings can be pickled. But when I try following,
def __del__ (self):
with open(self._pkl, 'wb') as f:
pickle.dump(dict(self._rec), ...
-1
votes
1
answer
38
views
Reading Excelsheets using openpyxl and Python
I have a folder with >1000 .xlsx-files containing data. I want to merge all that data into one sheet to process it further. Every .xlsx-file has 4 sheets called (Sheet 1, Sheet 2, Sheet 3 and Data)....
0
votes
2
answers
104
views
How can I store a function in an array in python?
I am trying to to store a function in an array and store that array in a dictionary so I can later call values from that array through the dictionary.
I created a zeros array and created a loop that ...
0
votes
1
answer
25
views
" 'Word2Vec' object has no attribute 'load_parent_word2vec_format' " error
I am trying to run an old code which uses python 2.7, and since it runs on the slow version of Word2Vec I want to update it to Python3 and when I did so I got this error:
'Word2Vec' object has no ...
0
votes
0
answers
65
views
How to execute a nodejs function from the python code?
Our application uses python and serverside nodejs.
There is python code which sends notifications to users. When a notification is send we need to send that info to a third part tool for analytics. We ...
0
votes
0
answers
42
views
How can I use psutil to Show Values which are Comparable to the Task Manager's Values?
I need your help with a psutil script. I want to log memory and CPU usage of a python 2 script in percent. For that I use something similar to the following loop:
while True:
for process in psutil....