Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 23390 articles
Browse latest View live

GUI is not getting dimmed when using tkinterdnd

End goal: When a user drags a folder to the GUI, the GUI becomes dimmed. My end goal is to have a plus icon or something that implies the user that you can drop it there. You know how you have them on...

View Article


"Unwanted software" error when compiling a python script one way yet not...

I want to compile a python script to an executable file, and I've been doing so using python -m PyInstaller --onefile script.py in PowerShell (Which works). However, I now want to create something that...

View Article


VKeyboard in kv file not work for TextInput

I want to Write something in my TextInput Box with My VKeyboard in kivy language .but it's not work.I've use json for VKeyboard becouse I not found another way for it.if you know how can I use...

View Article

How to write text back into correct spot in JSON file after translating all...

I have a JSON file where the structure looks like the following:{"events": [ {"id": 1,"name": "EV001","note": "","pages": [ {"list": [ {"code": 231,"indent": 0,"parameters": [ 0 ] }, {"code":...

View Article

Jinja2 (flask): How to pass blocks to a macro?

I'm implementing a python flask webapp and I'm trying to write a macro to which I want to pass three blocks of html-code, but couldn't get it run.I found a simple example on making use of jinja with...

View Article


PyAudio recording comes out empty

I am trying to see if I can get PyAudio to record from my USB microphone on my Kubuntu computer. When I run this script, it does create a file, but the file contains no audio. Not even background white...

View Article

Scraping website with API error "invalid nonce"

I'm trying to scrape this website - https://www.voxzogo.com/en-us/achondroplasia-doctor-finder/ for 10 zipcodes.Ideally would like to use the API with payload, but for some reason when I try to access...

View Article

Use ProgressListener with multiobjective in docplex (CPLEX)

I am translating an implementation of a gurobi model to cplex which uses multi-objective functionality and uses the following callbacks. The purpose of the callbacks is to extract the information from...

View Article


UnicodeDecodeError When Connecting to PostgreSQL Using psycopg2 in Python

I am encountering an issue when trying to connect to PostgreSQL using the psycopg2 library in Python. I get the following error:Traceback (most recent call last): File...

View Article


How to elegantly interleave two lists of uneven length?

I want to merge two lists in Python, with the lists being of different lengths, so that the elements of the shorter list are as equally spaced within the final list as possible.i.e. I want:l1 = [1, 2,...

View Article

Pycharm - How do you change the path to libraries? At our company we keep the...

Where I work all access to the outside world is blocked so they maintain the Python packages internally on something called Artifactory. I'm new to Pycharm configuration and need to know how to...

View Article

How to install scanpy?

I was trying to follow this YouTube video:https://www.youtube.com/watch?v=FqG_O12oWR4However the error message keeps coming up:ModuleNotFoundError Traceback (most recent call last)Cell In[3], line...

View Article

Issue with parsing in snowflake query

We are parsing s3 path in snowfalke query to fetch the partition_id for each table.Wrote a query its working fine if the part-*.parquet files present under the partitions.Giving a wrong results if the...

View Article


My Anaconda Navigator wont launch from cmd or manually

yesterday, i uninstalled my anti virus and after that , the navigator is not launching any more.i tried going to the script file and updating my conda and navigator.however the navigator update gets...

View Article

Safari cannot connect to local URL: http://127.0.0.1:5000

I try to run this simple flask hello word code:app = Flask(__name__)@app.route("/")def hello_world(): return "<p>Hello, World!</p>"but safari doesn’t want to connect to the url given by...

View Article


How can I filter uuid as text with Django?

How can I filter uuid as text with Django?For example, I wanted to do like below. class Group(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4,...

View Article

SQL Alchemy maps UUID-primary key to string

I'm working with SQLModel and I created following base-table and table:class GUIDModel(PydanticBase):""" Provides a base mixin for tables with GUID as primary key""" guid: Optional[UUID] = Field( ...,...

View Article


Python change UUID object to string representation list

When retrieving a queryset with values_list of PKs there are of type UUIDField Django gives you a list of UUIDField objects and NOT a list of string UUIDs.For example, the following gives me a query...

View Article

How to plot maps in Python in Mollweide projection with rotated coordinate grid?

In Python, I try to plot all-sky maps in Mollweide projection. I am looking to be able to show maps with arbitrarily rotated coordinates and coordinate grid. See the following generic grid image...

View Article

Ghostscript module installation issue

I need to use the Ghostscript module in PMython for a project. It's not the first time.My issue is that on the laptop. I'm using right now (not at home), I can't install the module.Pip just refuses to...

View Article
Browsing all 23390 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>