473,539 Members | 9,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
0
2,422
thread by: kglaser89 | last post Sep 16 '21 by: kglaser89
I am relatively new to Django and very new to writing unit tests. I'd like to ask for assistance but I'm a bit stuck with where to even begin. The app I'm working with allows a teacher to assign multiple assignments to a student. On the student dashboard, an assignment should only be available if the start date <= today's date. The student should...
0
3,564
thread by: Andrei1234 | last post Sep 17 '21 by: Andrei1234
ERROR 5: D:/cadastru2/task1B\ndvi\T35TNK_20210512T085601_NDVI.tif, band 1: Access window out of range in RasterIO(). Requested (20979,445042) of size 45x13 on raster of 10980x10980. The problem is if I add my raster to QGIS and use the zonalStats plugin I get no errors whatsoever. So what am I doing wrong? import gdal from osgeo import ogr...
0
3,580
thread by: Learner99 | last post Oct 13 '21 by: Learner99
{'data': {'close': 469.25, 'high': 484.4, 'low': 468.1, 'open': 470.0,}}
0
8,046
thread by: aakanksha | last post Oct 28 '21 by: aakanksha
this is a code and i ma getting error which is NameError: name 'pipe' is not defined nlp = spacy.blank('en') def train_model(train_data): if 'ner' not in nlp.pipe_names: ner = nlp.create_pipe('ner') nlp.add_pipe(ner, last=True)
0
7,572
thread by: jrrobb | last post Oct 29 '21 by: jrrobb
I wish to use the attached code to run my robot as an Obstacle Avoider. a run check on the code stops at CODEavgDistance=0/CODE and I am unable to find the solution. This is on an Raspberry Pi 3 B with latest Rasbian O/S. CODEprint ("right") stop() count=0 while True: i=0 avgDistance=0 for i in range(5): GPIO.output(TRIG, False) ...
0
8,986
thread by: terrysc04 | last post Dec 29 '21 by: terrysc04
I am trying to understanding a coding challenge. I need to create a YAML file to automate deployment of an ec2 instance. Here is the specifications of the YAML file: # This YAML configuration specifies a server with two volumes and two users server: instance_type: t2.micro ami_type: amzn2 architecture: x86_64 ...
0
9,816
thread by: ScubaStimpy | last post May 22 '22 by: ScubaStimpy
Hi all, i could use a little help with this one, i'm supposed to be calculating decay rates using specifically trinket but i'm having trouble with line 23 of my code, namely i'm getting a tuple/float error. "TypeError: unsupported operand type(s) for Div: 'list' and 'float' on line 23 in main.py" from math import * import numpy as np from...
0
806
thread by: pradyumnajpn | last post Feb 18 '22 by: pradyumnajpn
Hi folks.. Novice in scripting..need your help pls. I dont know also for this which scripting will be good also. Please point me somewhere I can start with wanted to generate a log file . log file should have deliminated with "|" and 100 lines each file and each line should be of 400 bytes. data : 20220101 time : 00:10:10 Pid : 3500...
0
6,225
thread by: titboyjr | last post Feb 23 '22 by: titboyjr
sorry if this question is dumb, I just can't figure it out but I know I'm close. Please dont roast me too hard ok I'm pretty new at python but I've been having this problem What I'm trying to do is upload a file via api using Requests and pyhon Actually I have to make 2 post requests. The first one I include my api key and I get this...
0
2,181
thread by: Scoosh | last post Mar 20 '22 by: Scoosh
I am doing a project which involves displaying details of cars, vans, etc. The vehicles all have the same attributes apart from 1. When I try to display the attributes for the different vehicles I get this: GC15AV0 is a Blue Skoda Octavia It has <function car.get_number_of_doors at 0x00000239C6C9F3A0> doors. Located at Paisley Its price is £...
0
3,488
thread by: kaijoh26 | last post Mar 30 '22 by: kaijoh26
#include <stdio.h> #include <stdlib.h> /*ADJACENCY MATRIX*/ int source,X,Y,time,visited,Z; void DFS(int p) { int q; visited=1; printf(" %d->",p+1); for(q=0;q<X;q++)
0
10,666
thread by: TLILI MED | last post Apr 21 '22 by: TLILI MED
Hello something that i don't understand I launch a prog.py recovering the selected line of a treeview, I assign these values ​​to the 2 fields, the tt happens correctly. prog.py def selection curitem=tree.focus() dict=tree.item(curitem)
0
9,636
thread by: ahmedbarbary | last post May 3 '22 by: ahmedbarbary
I work on sql server 2017 I run script depend on python language v 3.10 . I need to export data to excel fileStudentExport.xlsx already exist, and keep header without change after export. header of excel file StudentExport.xlsx before export data to it as below StudentId,StudentName after run script query to export data to...
0
6,050
thread by: DarlinRey | last post May 18 '22 by: DarlinRey
I am working on a project to create a voice assistant using python 3.10 in pycharm. When the program starts, an error appears: Traceback (most recent call last): File "D:\alexa.py", line 56, in <module> query = takecommand().lower() File "D:\alexa.py", line 37, in takecommand with sr.Microphone() as source: File...
0
9,400
thread by: jkthappeta | last post May 29 '22 by: jkthappeta
In my guessing game, when the correct (five-letter) word is entered on the first try, it works fine (which means, it returns the correctly guessed word). But, when the correct word is entered on any other than the first try, it is returning None instead. import random def word_list(): with open("MyFile.txt", "r") as file: ...
0
8,887
thread by: Swarna L | last post Jun 7 '22 by: Swarna L
import re from collections import OrderedDict file = open(input("Input-file name : ") , "r") fi = file.readlines()## convert to list of lines key= val= keyapp=False for line in fi: if re.match(r'^*:\s*\d',line): #print(line)
0
8,084
thread by: xykovyci | last post Jun 18 '22 by: xykovyci
I am writing a python script. My job is to find the last date of iCalendar event from recurrence rule. This is RFC https://datatracker.ietf.org/doc/html/rfc5545. I want to know what is the best Python library to do that. I just need to store event expiry time. Is there any code already available to do that?
0
9,109
thread by: decoratorWrap | last post Jun 22 '22 by: decoratorWrap
i want to edit the python files. but whenever i right click, everything disappear. that is the first problem i am facing. second problem is whenever I want to debug the code related to this package, i cant navigat through the source lines though IDLE debugger is showing the line and line numbers only inside debugger.
0
4,625
thread by: Linh Lee | last post Aug 23 '22 by: Linh Lee
resp_code, mails = imap_ssl.search(None, '(FROM "a")') I want to search emails from a specific one letter named user, "a". Example: <a@ocmd.improvidentially.com> <a@akesan.ovoerelaborating.com> Problem is, search results cause all users with an "a" as part of there name to be returned. Example: jane@domain.com
0
4,108
BarryA
thread by: BarryA | last post Jul 14 '22 by: BarryA
Hi everybody, I joined this group to learn more about web development. I am familiar with Java, C, and HTML, and am actively learning CSS and Python. And I'm facing some issues! Can somebody help me? After deploying and hosting my website, I upgraded my pip version. Then I installed the pypaystack package. When I try to push to Heroku, I get...
0
8,942
thread by: autodeveloper | last post Jul 26 '22 by: autodeveloper
Background Recently, I to monitor contact info of some slack channels, but I don't have API to invoke. So I need use UI Automation to finish this task. I found this library recently Clicknium, besides support web automation like selenium, it also supports desktop automation, that is useful for me. You can follow the getting started of this...
0
5,975
thread by: clicknium | last post Jul 25 '22 by: clicknium
Clicknium Automation Sample Solution - Customer Onboarding This is a sample of customer onboarding solution with clicknium web automation. For one enterprise, customer onboarding has a significant impact on a customer willingness of using your product. You may define the customer onboarding process in your company internally,for example,...
0
4,786
thread by: prahladyeri | last post Aug 23 '22 by: prahladyeri
My project involves reading text from a bunch of PDF form files for which I'm using PyPDF2 open source library. There is no issue in getting the text data as follows: reader = PdfReader("data/test.pdf") cnt = len(reader.pages) print("reading pdf (%d pages)" % cnt) page = reader.pages lines = page.extract_text().splitlines() print("%d...
0
3,945
thread by: Linh Lee | last post Aug 19 '22 by: Linh Lee
Any python experts willing to share there knowledge, please?! Want to: 1. Search ALL folders including SPAM, for "specific_user@ANY (wildcard) domain" 2. Move those emails to folder called DUMP 3. Delete contents of DUMP Unfortunately I can't figure out how to do what I need above in Yahoo Mail! My code so far below:
0
6,669
thread by: jmwhawk | last post Aug 13 '22 by: jmwhawk
Brand new to Python. I am looking on advice on how to create a set of buttons on top of a label in my main window. These 5-6 buttons will be chosen from 3 excel sheets based by the user values set in a QSpinBox (values 1-20) and a QSlider (values 1-3). Then the buttons will be generated by a QButton and each button can be closed after user...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.