Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: 'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xe2 in positi...

(Sep-18-2020, 07:43 AM)buran Wrote: I told you what the multiple issues are with your code are and why I said it does not make any sense. You can continue to believe whatever you want. And please, d...
cnull General Coding Help 12 11,561 Sep-18-2020, 07:49 AM
    Thread: 'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xe2 in positi...

ensure_ascii=Falsethis part will work for his. text/str part if html/div/class... due to the title shot use.
cnull General Coding Help 12 11,561 Sep-18-2020, 07:38 AM
    Thread: 'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xe2 in positi...

(Sep-18-2020, 06:49 AM)buran Wrote: @cnull, this does not make any sense and almost certainly will produce error. @snippsat show the right way to read/write jsonA code I've used before and included ...
cnull General Coding Help 12 11,561 Sep-18-2020, 06:59 AM
    Thread: 'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xe2 in positi...

for item in file: f.writelines(str(json.dumps(item.text,ensure_ascii=False)))
cnull General Coding Help 12 11,561 Sep-18-2020, 06:43 AM
    Thread: Unable to print stuff from while loop
Post: RE: Unable to print stuff from while loop

Because it is outside the index element. scan by loop: i=0 mytab = list(range(1,5)) while True: mytab[i]+=mytab[i] i+=1 if i>3: break for item in mytab: print(item)
cnull General Coding Help 4 2,355 Sep-17-2020, 02:18 PM
    Thread: Exit Function - loop
Post: RE: Exit Function - loop

Does this work right? def songplay(song): with outport as output: try: midifile = MidiFile(song) while True: for message in midifile.play(): ...
cnull General Coding Help 2 2,065 Sep-17-2020, 08:05 AM
    Thread: Need help...
Post: RE: Need help...

What exactly do you want to do?
cnull General Coding Help 3 1,749 Sep-16-2020, 01:13 PM
    Thread: What is wrong with my code???
Post: RE: What is wrong with my code???

def prime_num(a): counter=1 if a>1: for x in range(2,a): if(a%x)==0: return ("The number is NOT PRIME") counter=0 break ...
cnull General Coding Help 15 5,071 Sep-16-2020, 12:48 PM
    Thread: What is wrong with my code???
Post: RE: What is wrong with my code???

def prime_num(a): counter=1 if a>1: for x in range(2,a): if(a%x)==0: print("The number is NOT PRIME") counter=0 break ...
cnull General Coding Help 15 5,071 Sep-16-2020, 12:31 PM
    Thread: Beginner having Syntax Error problem
Post: RE: Beginner having Syntax Error problem

x=int(input('Input first number.\n')) y=int(input('Input second number.\n')) a=int(input('What calculation you want to perform?\n 1 +, 2 -,3 *,4 / \n')) if a==1:print('The answer is ',x+y) if a==2:pri...
cnull General Coding Help 3 2,378 Sep-10-2020, 08:33 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020