Quantcast
Browsing all 13981 articles
Browse latest View live

Creation of django project [duplicate]

Image of my problem(django)After installation of django in pycharm, I tried creating my first ever django project but I encountered a problem. Then I decided to check the version of django installed...

View Article


how to read space-separated values (csv) file made using shell-like syntax...

i'm looking for a fast way to read a csv file into dataframe. the csv file is a space separated, however, columns names are placed between double quotation if it contains more than one word &...

View Article


How to get image url string from j["data"] in Python?

I have the following snippet of code that creates json data (?dictionary?). I can't figure out how to get the avatarUrl string def __init__(self, character_id): self.character_id = character_id...

View Article

GeoAlchemy2 not calling function when executed after upgrading versions

I just upgraded GeoAlchemy2 from version 1.4.x to 2.0.x and am having some issues using the geoalchemy functions now.Initially when upgrading versions I was getting the following...

View Article

Embed icon in python script

Does anybody know a way to embed an icon in a Python script such that when I create my standalone executable (using pyinstaller) I don't need to include the .ico file? I know this is possible with...

View Article


Django-based Docker project will connect to local postgres DB on windows...

Been struggling with this issue for close to a month now and I am at my wits end.I have the following docker-compose.yml file:version: '3.8'services: web: container_name: targeting build: ./Targeting...

View Article

Why does stamen terrain return an error in my web app code?

code:import foliummap = folium.Map(location=[38.58, -99.09],zoom_start=6, tiles="Stamen Terrain")map.save("Map1.html")error:File "C:\Users\Koku Lwanga\PycharmProjects\webmap\map1.py", line 2, in...

View Article

What does above exception points to in exception info thrown?

The simplest built-in exception as below:>>> 1/0Traceback (most recent call last): File "<stdin>", line 1, in <module>ZeroDivisionError: division by zeroThrow exception info ,then...

View Article


Reading a file in python macOS [duplicate]

So basically, I'm new to coding and I'm trying to read the contents of a .txt file and I'm able to do that by hardcoding the file path of the .txt file but I'm trying to write lines of code where it...

View Article


How can I sort a string list in Python with two criterias at the same time?

Given I have a string list in Python:list = [" banana ", "Cherry", "apple"]I want to sort this list to be case insensitive AND ignore the whitespaces. So like this:list = ["apple", " banana ",...

View Article

Pygame works with python.exe and IDLE but not in VS Code and PyInstaller...

I'm encountering a peculiar issue with Pygame where it works perfectly fine when running a script using python.exe or Python IDLE, but it fails to work in Visual Studio Code (VS Code) and when packaged...

View Article

How do I train an AI to improve my python crossword app? [closed]

I am writing a crossword app in python. Most of the time it generates good crosswords, however, some are not as readable. I was wondering if I could teach an AI what a good/bad crossword looks like,...

View Article

How to fix error when calling activate pygetwindow

I have an array of windows with a specific title. When executing the ".activate()" command to an array from these windows, this error periodically occurs: File...

View Article


TFIDF Vectorizer not assigning values to all rows of data

I am attempting to create a song recommendation system. For starters I used TFIDF on all genre names with the following code:data['track_genre'] = data['track_genre'].fillna("")tfidf_vector =...

View Article

Receiving KeyError for a key that exists [closed]

So I wanted to try out a Machine Learning project to learn more about it, and decided to build a model that predicts bitcoin prices. When I try to retrieve the comment from each wiki revision, I get a...

View Article


Is there a way to disable a Pylint check for modules matching a string or regex?

One example: We have many SQL Alchemy models.py files in our repo. It's obvious from our directory structure what the purpose of each models.py is. I'd really like to disable missing-module-docstring...

View Article

NoReverseMatch at /login/login/signup

I am trying to create a sign up page using djangoafter the user press the sign up button i want the page to redirect them to another page using this line of codereturn redirect('congrat')and also a...

View Article


LLM RAG with Agent

I was trying the application code in the link.I am using the following Llang Chain versionlangchain 0.0.327langchain-community 0.0.2langchain-core 0.1.0Getting the following error:Entering new...

View Article

Evaluating the end time of a period of time

I am working on a simple code able to evaluate the end time of a period of time, given as a number of minutes (it could be arbitrarily large). The start time is given as a pair of hours (0..23) and...

View Article

Problems accessing text file to create a password guessing game

I'm using python and a text file with the top 12,000 most common passwords. It's a game for educational purposes where the program needs to be able to access the text file to then check if it's the...

View Article
Browsing all 13981 articles
Browse latest View live


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