Python Forum
Need help to read a gzip stream...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help to read a gzip stream...
#1
Following code errors, and I have tried every mechanism that is available on google search. Still could not get the stream to uncompress without errors. But the same file can be read in both Java and Scala.

orig_file_desc = GzipFile(mode='r', fileobj=(io.StringIO(fileResponse.text)))
csvReader = csv.reader((orig_file_desc))
print("two")
for csvReaderRow in csvReader:
print(', '.join(csvReaderRow))

And error for the above is "AttributeError: 'str' object has no attribute 'read'"

And various other errors for each other methods to get the job done. I used, zlib too.

Help is much much appreciated...
Reply


Messages In This Thread
Need help to read a gzip stream... - by pythonchakri - Nov-03-2017, 07:13 PM
RE: Need help to read a gzip stream... - by Larz60+ - Jun-06-2019, 03:02 PM
RE: Need help to read a gzip stream... - by Larz60+ - Jun-06-2019, 10:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Microphone stream manipulation Talking2442 1 2,747 Nov-19-2023, 02:08 PM
Last Post: palumanic
  EEG stream data with mne and brainfolw PaulC 0 496 Aug-22-2023, 03:17 AM
Last Post: PaulC
  python gzip all files from a folder mg24 3 4,033 Oct-28-2022, 03:59 PM
Last Post: mg24
  Decoding a serial stream AKGentile1963 7 8,609 Mar-20-2021, 08:07 PM
Last Post: deanhystad
  Best Video Quality And Stream Harshil 2 2,260 Aug-19-2020, 09:03 AM
Last Post: Harshil
  stream audio from pc to pc floatingshed 2 1,989 Sep-16-2019, 03:45 PM
Last Post: floatingshed
  pi camera stream is upside down delta1071 3 5,762 Sep-11-2019, 11:35 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

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