Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: g Null Byte using DictReader
Post: RE: g Null Byte using DictReader

Hi Buran, this code is a part of my project. and the csv file I am reading it from rest api which contains NULL Byte. def getCSV(csv_file): stream = io.StringIO(csv_file.stream.read().decode(...
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 08:45 AM
    Thread: g Null Byte using DictReader
Post: RE: g Null Byte using DictReader

This below error is fixed. utf-8' codec can't decode byte 0xa0 in position 252862: invalid start byte but currently getting error. _csv.Error: line contains NULL byte on line "for line in reader:" t...
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 08:14 AM
    Thread: g Null Byte using DictReader
Post: RE: g Null Byte using DictReader

Still getting same error. csv.Error: line contains NULL byte the main issue is in below line of code for line in reader:reader object contains null bytes and throwing error here
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 07:33 AM
    Thread: g Null Byte using DictReader
Post: RE: g Null Byte using DictReader

it says, TypeError: 'error' is an invalid keyword argument for this function
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 07:13 AM
    Thread: g Null Byte using DictReader
Post: RE: g Null Byte using DictReader

can you tell me in code how to pass it error argument'ignore' or 'replace' here
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 07:02 AM
    Thread: g Null Byte using DictReader
Post: RE: g Null Byte using DictReader

Hi Larz60+ I tried with utf-8 also but still same error. _csv.Error: line contains NULL byte
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 06:23 AM
    Thread: g Null Byte using DictReader
Post: g Null Byte using DictReader

I have the below code stream = io.StringIO(csv_file.stream.read().decode('utf-8-sig'), newline=None) // error is here reader = csv.DictReader(stream) list_of_entity = [] line_no, prev_len = 1, 0, f...
eshwinsukhdeve General Coding Help 13 7,378 May-15-2019, 05:08 AM
    Thread: HTTP 400 response code
Post: HTTP 400 response code

Hi, I have written python post rest api in my application, which accepts files too, I have called this api 11 times, for first 3 APIs I am able to call successfully, Bit from 4th to 11th APIs are fai...
eshwinsukhdeve General Coding Help 1 1,696 Mar-03-2019, 02:11 PM

User Panel Messages

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