Questions tagged [python-3.x]

DO NOT USE UNLESS YOUR QUESTION IS FOR PYTHON 3 ONLY. Always use alongside the standard [python] tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

I an trying to run a code(several .py files from git hub) in google colab. I mounted the drive in colab

File "/content/drive/MyDrive/SNN_DFE/Simulate_SNN_DFE_Equalizer.py", line 75, in Loops.Eval(Init_Model_Path, File "/content/drive/MyDrive/SNN_DFE/Loops.py", line 493, in Eval ...
Devi's user avatar
  • 1
0 votes
0 answers
19 views

finding data from 2 excel in python [duplicate]

the first of contains names in the column named name and the working hour of that names in the column named working hour , and I want to read the names from the firs excel and then read the salary of ...
sadaf's user avatar
  • 11
-5 votes
0 answers
16 views

LinkedIn User Account Block Error while Using Linkedin API Library python [closed]

I am facing an account blocking problem while using the Python library for fetching Linkedin user data (https://pypi.org/project/linkedin-api/). If anyone can give me a solution to prevent my LinkedIn ...
muhammad zaid's user avatar
0 votes
0 answers
14 views

Unable to trigger ServiceBusTrigger function app written in python in azure

I am using two function apps - HttpTrigger and ServiceBusTrigger. In Httptrigger I am writing data to service bus queue, which is working and I am able to see message in Service Bus explorer. I want ...
Pratik das baghel's user avatar
1 vote
1 answer
40 views

How to skip a value when replacing values in an external file with values from a dataframe?

I have a file that's made up of entries like: A first = 4 | 1_3_5_4 Name1 labelToSkip i = 1000000 j = -3 k = -15 end B first = 4 | 9_2_2_4 ...
Ant's user avatar
  • 785
0 votes
0 answers
10 views

Move column to the left in excel with openpyxl

with openpyxl can we move column 'EE' to column 'CC' it should look like below excel here column 'EE' moved to 'CC' place and 'CC' automatically moved ahead
Sagar Patil's user avatar
0 votes
0 answers
7 views

While using joblib.Parallel and partial, would the hidden parameters be copied?

Suppose I have 2 Python functions: funcA and funcB. funcA takes a large_data as input which is generated in funcB. And funcA is called within funcB many times. I would like to use joblib.Parallel to ...
Lei Hao's user avatar
  • 730
0 votes
0 answers
9 views

asdf python not installing properly on mac sonoma

I followed the asdf instructions to install python and its not working properly. I installed python version 3.11.6 and 3.12.0. When I run the command asdf global python 3.11.6 it does nothing. If I ...
user1086377's user avatar
0 votes
1 answer
11 views

Extracting Section of HTML Code Using Python

I am trying to extract the string "2 and a half stars, 4688 Ratings" in python from the below html string. I used this command and got this set of data. I can't figure out how to extract ...
JMHA1997's user avatar
0 votes
2 answers
47 views

How do I convert a normal string in another format?

How do I convert a normal string in another format using Python script? For exp: a normal "String" into BOLD "String" or other format fonts! I tried with these two modules but ...
Troy9090's user avatar
0 votes
0 answers
3 views

Control duplication of legend items in Python Plotly.express

I am using plotly.express to produce a figure with 3 subplots. The legend repeats for each subplot, so I have 3 legend listings (one for each subplot) for each item. All operate together when I click ...
WillH's user avatar
  • 281
0 votes
1 answer
28 views

failed to mock function in the python [duplicate]

I have a simple python code in the VS Code. under a package my, there are two files aa.py and test_aa.py aa.py # Function to be tested def add(a, b): return a + b test_aa.py from unittest.mock ...
Joe's user avatar
  • 327
-1 votes
1 answer
24 views

How do I get my python Webscraper to request the input URL as intended? [closed]

I have been trying to follow this basic tutorial for a python webscraper. https://www.stationx.net/hacking-with-python/?ck_subscriber_id=2408437170 But, unfortunately terminal does not print "...
Mike Del's user avatar
0 votes
0 answers
9 views

Generating data set for database simulation

So i had this idea of generating a csv file with loads of data in python so that I can use that data as like a showcase for my database in my website. My database is in Docker MySQL via Flask and the ...
Sirben's user avatar
  • 1
0 votes
0 answers
18 views

How to only attach a new accumulative ID to my groups only if they are continuously present in the data set?

I have a dataset with group_ids. I want to attach unique ids to the groups when they are consistently present in my dataset, meaning they disappear for maximum 5 seconds. If they disappear more than 5 ...
kkjjnn's user avatar
  • 11
0 votes
0 answers
41 views

how is the django's channels performance? [closed]

i have a website for chatting and dating . and this website is programmed in django and channels of django. this website will make a WebSocket connect since the user enter to the website (not only ...
momo's user avatar
  • 1
0 votes
0 answers
17 views

AttributeError: 'NoneType' object has no attribute 'update' when trying to add files to a csv file

I've been working on an expense manager in python where you can import you spending from CSV file add more put them in a chart etc then you could export the info into CSV file but then faced this ...
BLAZE GAMING's user avatar
-6 votes
0 answers
47 views

Can someone please tell me what is wrong with my teachers code so that u am able yo fix it [closed]

this is what my teacher sent me home with: enter image description here image and error: enter image description here enter image description here Display names from that file that I have no idea ...
Jonathan 's user avatar
1 vote
1 answer
36 views

How to write specific values from a Pandas (Python) dataframe to a specific place in a file (i.e., after an identifier)?

I have a file that's made up of entries like: A first = 4 | 1_3_5_4 Name1 labelToSkip i = 1000000 j = -3 k = -15 end B first = 4 | 9_2_2_4 ...
Ant's user avatar
  • 785
-3 votes
4 answers
45 views

How to iterate over a dictionary and modify values in Python?

I have a Python dictionary, and I want to iterate over its key-value pairs and modify the values based on a certain condition. Here is an example dictionary: my_dict = {'a': 10, 'b': 20, 'c': 30} for ...
Sandesh Raj Yadav's user avatar
-1 votes
0 answers
33 views

Python Escaped Character Pain and Suffering. I just want (1) \ [duplicate]

Can anyone explain to me what in the world Python is doing, and how to fix it. I just want to convert this: myIn = "00" to perform the same as this thisBytes = b'\x00' I've tried escaping ...
vbj4's user avatar
  • 1
2 votes
1 answer
50 views

Handle circular import of subclasses types in abstract class

I am facing a circular import error when I define type aliases for the subclasses of an abstract class. This is an example of what I'm trying to achieve: #abstract_file_builder.py from abc import ABC,...
CarlosMorente's user avatar
-2 votes
0 answers
33 views

What Advantages Does the Numpy Array Have over a Nested list? [duplicate]

here, i was confused to understand the nested list which appears complicated to me sometimes. please just explain it to me. it was my first time using numpy in python, so I really don't know what it ...
Varma Vegesna's user avatar
0 votes
0 answers
22 views

I can't get `extra_fields` printend each time a new user is created

I'd like to know why I can't get extra_fields printed each time a new user is created. I'm working with a CustomUserModel and I want to allocate the created object to a specific group based on its ...
Minux-Dev's user avatar
0 votes
0 answers
18 views

No Redis configuration! error for simple flask app using rq-dashboard

rq-dashboard works from the command line, but not integrated into flask. The simple example from github from flask import Flask import rq_dashboard app = Flask(__name__) app.config.from_object(...
jgm_GIS's user avatar
  • 201
0 votes
0 answers
32 views

Why does a black background appears when there seems to be no issue with the code?

So I am just learning the basics of python GUI and was learning to use tkinter but when I created label and tried to add both text and image inside the label and compound them a black screen appears. ...
Arjan's user avatar
  • 1
-3 votes
0 answers
28 views

Execução automática com Actions do Github [closed]

Eu preciso que meu código em python seja executado de forma diária as 23:00, com o intuito de gerar ou adicionar dados em um CSV. Para isso, criei uma automação no github executa de forma agendada o ...
Elton Yoshi's user avatar
2 votes
1 answer
25 views

Pymunk body object being problematic

I am using this video tutorial: Video I am making a ball (with 0 mass at the moment) in pymunk and trying to show it on pygame but it is not working I tried doing this to make a ball in pymunk and ...
Ishwari Katariya's user avatar
-1 votes
0 answers
16 views

3D plot of cube [closed]

I'm completely new to python and I have to create a 3D plot that has the shape of a cube like the image: Import Necessary Libraries: import matplotlib.pyplot as plt: Imports the matplotlib library for ...
Ritik Rai's user avatar
2 votes
0 answers
13 views

Attribute Error initialising Ray in Python

My python environment details are below. This is a conda virtual env that I created just to test ray core as on this Ray getting started tutorial. Initialising Ray throws the error: "...
Zhubarb's user avatar
  • 11.6k
0 votes
0 answers
9 views

Unwated consistency of solver results with pyomo over several runs

I'm using pyomo 6.6.4 and several solvers (Ipopt, Bonmin, Cbc,...) to solve different relatively complicated models (MINLP in general). Since my models have known infeasibility points I am solving ...
djo's user avatar
  • 13
-2 votes
1 answer
34 views

TypeError: unsupported format string passed to list.__format__ while trying to export a dictionary to a csv file

I have seen this YouTube tutorial for a Python expense tracker and trying to add more functionality by allowing you to import or export data to a CSV. I keep facing errors. I also tried to make a ...
BLAZE GAMING's user avatar
0 votes
0 answers
20 views

Asynchronously update data for Python curses app

I am writing an application in curses, which will display information from some API. I've created a function to add some IDs on a queue and a function which requests new data for the ID from a queue. ...
Monika's user avatar
  • 23
1 vote
2 answers
62 views

Python doesn't write back to file modified line

I have this function that is supposed to modify an int in the format of a string and write back the changes to the file. I am sure the isbn passed to the function is correct. Here is my function: def ...
AjaXI's user avatar
  • 13
0 votes
0 answers
24 views

Error installing package pip install orange3==3.30

I would like to install pip install orange3==3.30 in jupyter notebook (On Windows 11 and python 3.12). I get this error when I run !pip install orange3==3.30 code. × Getting requirements to build ...
Dani1991's user avatar
-1 votes
0 answers
16 views

How to create a program to find Fibonacci Series using OOPs in Python? [closed]

Problem is I am unable to figure out how to combine the logic of Fibonacci Series in OOPs in python. I got stuck in some loops and attributes.I want to make it using recursion and memory efficient ...
Prayas Kumar Kamila's user avatar
0 votes
0 answers
16 views

The "Complete" and "Show Completed" events not trigger properly in a gui.py while app is running

I was working on a to-do app on PyCharm Community Edition, learning how to make one from an online bootcamp. I decided to add more functionalities (login authentication, tkinter calendar display, etc.)...
haze166's user avatar
0 votes
1 answer
33 views

how to dynamically insert random value to a column in excel through pandas?

I have below two functions: import pandas as pd import random import string def random_alphanumeric(length, hyphen_interval=4): characters = string.ascii_letters + string.digits random_value =...
user3521180's user avatar
  • 1,084
0 votes
0 answers
23 views

How can one plot a 3D surface in matplotlib by points' coordinates?

After awhole day of searching, in desperation, I address to you, my dear fellows. I want to draw a 3D surface of human head, for which I have found nice of 3D coordinates. Using 3D scatter plot, ...
endocringe's user avatar
0 votes
1 answer
27 views

How can I fix my Hangman game so it shows duplicate letters instead of just the first instance of a correct guess?

I'm a Python-rookie and am currently working on my first real "project" trying to put together a Hangman game, however I'm having an issue with the program when I guess a letter that appears ...
Jan's user avatar
  • 3
0 votes
0 answers
14 views

How to connect to local machine over static global IP with python

I have a program on server. Program is running on some port, like 30000, as example. I have a client, which is connecting over socket to the server with server's local ip and port (30000). (Both, ...
Mika's user avatar
  • 53
-1 votes
0 answers
25 views

How fix error RuntimeError got Future <Future pending> attached to a different loop asyncio?

I reopen my questions, because last closed without answer I have a socket server. Processing of data that comes in occurs in separate threads. Then you need to write new data from the stream to the ...
test_celery's user avatar
0 votes
0 answers
17 views

Python IMAP Gmail Connection Error on Hosting Services but Works Locally

I have a Python script that connects to Gmail using IMAP, which works perfectly in my local development environment in Visual Studio. However, when I try to run the same script on a hosting service (...
Adil Akram's user avatar
0 votes
0 answers
31 views

Google colab - google drive interface: reliable refresh

I am trying to used Google Drive and Google Colab to run some online data analysis while a detector is taking data. The detector is connected to a computer, and saves .txt files to Google Drive as it ...
Beth Long's user avatar
  • 375
0 votes
0 answers
38 views

SQLAlchemy error after upgrading to python 3.11 [duplicate]

I'm using Ubuntu 22.04 and I wanted to upgrade python from 3.10 to 3.11. However, now I'm experiencing problem with flask when trying to run my project. This is my pipfile: [scripts] start = "...
Maks's user avatar
  • 11
0 votes
0 answers
5 views

Why i get wrap socket error message when sending an email through python 2023?

im trying to send an email throiugh python from my gmail email address I followed the instructions from this video: https://www.youtube.com/watch?v=g_j6ILT-X0k but i get the following error message (...
DoctorShe's user avatar
0 votes
0 answers
13 views

Python and Livy compatible version

I have a VM in which livy server is running, and livy version is 0.7.1 and spark version is 2.4.8 and I'm using python 3.7 version Can I upgrade the my python version to >=3.8, will that be ...
Chithal's user avatar
  • 59
0 votes
0 answers
25 views

How to save in a variable a portion of ndarry image?

I'm facing problem in saving in a variable a portion of an image that is described in the following way: def extract_face_region(image, landmarks): landmark_coords = np.array([(landmarks.part(i).x,...
leonardo20's user avatar
0 votes
0 answers
16 views

how to add content controls in word document using python

I want to add content controls in my word document so that if someone update them in word it automatically update in whole document where ever it is used. for example, I want date on first page of ...
krishna vaishnav's user avatar
0 votes
1 answer
34 views

Tkinter entry in (python) doesn't get the value

I am new to tkinter, my code's main menu entry functions work properly but the add project entry function doesn't work, I want to get addprojects entry value to a variable for further code expantion. ...
algotyrnt's user avatar

1
2 3 4 5
6842