Python Forum
charmap codec can't decode byte error with gzipped file in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
charmap codec can't decode byte error with gzipped file in python
#2
You should post all Traceback because there is also line number of error.
Also all email imports should be posted.

Try line 11:
body = MIMEText(content, 'html', 'utf-8') 
Line 16:
with open(filename, 'r', encoding='utf-8') as f:
Reply


Messages In This Thread
RE: charmap codec can't decode byte error with gzipped file in python - by snippsat - Apr-30-2019, 04:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search for multiple unknown 3 (2) Byte combinations in a file. lastyle 7 1,324 Aug-14-2023, 02:28 AM
Last Post: deanhystad
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 16: invalid cont Melcu54 3 4,932 Mar-26-2023, 12:12 PM
Last Post: Gribouillis
  Decode string ? JohnnyCoffee 1 814 Jan-11-2023, 12:29 AM
Last Post: bowlofred
  [SOLVED] [Debian] UnicodeEncodeError: 'ascii' codec Winfried 1 1,024 Nov-16-2022, 11:41 AM
Last Post: Winfried
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character Melcu54 7 18,875 Sep-26-2022, 10:09 AM
Last Post: Melcu54
  Byte Error when working with APIs Oshadha 2 1,010 Jul-05-2022, 05:23 AM
Last Post: deanhystad
  ASCII-Codec in Python3 [SOLVED] AlphaInc 4 6,123 Jul-07-2021, 07:05 PM
Last Post: AlphaInc
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 error from Mysql call AkaAndrew123 1 3,444 Apr-28-2021, 08:16 AM
Last Post: AkaAndrew123
  JSON Decode error when using API to create dataframe Rubstiano7 4 2,937 Jan-11-2021, 07:52 PM
Last Post: buran
  Skeleton file export error Python Code pepapoha 4 3,484 Nov-17-2020, 02:06 AM
Last Post: pepapoha

Forum Jump:

User Panel Messages

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