On May 4, 3:40 am, [EMAIL PROTECTED] wrote:
> On Thu, May 03, 2007 at 10:28:34AM -0700, [EMAIL PROTECTED] wrote:
> > On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> > > On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > > > As Larry said, this most likely means there are null bytes in the
[EMAIL PROTECTED] wrote:
> I'm guessing that your file is in UTF-16, then -- Windows seems to do
> that a lot. It kind of makes it *not* a CSV file, but oh well. Try
>
> print open("test.csv").decode('utf-16').read().replace("\0",
> ">>>NUL<<<")
>
> I'm not terribly unicode-savvy, so I'll
On Thu, May 03, 2007 at 10:28:34AM -0700, [EMAIL PROTECTED] wrote:
> On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> > On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > > As Larry said, this most likely means there are null bytes in the CSV
> > > > file.
> >
> > > > Ciao,
> > > >
On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > As Larry said, this most likely means there are null bytes in the CSV
> > > file.
>
> > > Ciao,
> > > Marc 'BlackJack' Rintsch
>
> > How would I go about identifying where it is?
>
On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > As Larry said, this most likely means there are null bytes in the CSV file.
> >
> > Ciao,
> > Marc 'BlackJack' Rintsch
>
> How would I go about identifying where it is?
A hex editor might be easiest.
You could also use Python:
> for boxid, mac, activated, hw_ver, sw_ver, heartbeat, name,
> > address, phone, country, city, in csvreader:
> > _csv.Error: string with NUL bytes
> > Exit code: 1 , 0001h
>
> As Larry said, this most likely means there are null bytes in the CSV file.
>
> Ciao,
In <[EMAIL PROTECTED]>, fscked wrote:
> The traceback is as follows:
>
> Traceback (most recent call last):
> File "createXMLPackage.py", line 35, in ?
> for boxid, mac, activated, hw_ver, sw_ver, heartbeat, name,
> address, phone, country, city, in csvrea
mainbox.attrib["boxid"] = boxid
indent(root)
ElementTree(root).write('test.xml', encoding='UTF-8')
The traceback is as follows:
Traceback (most recent call last):
File "createXMLPackage.py", line 35, in ?
for boxid, mac, activated, hw_ver, sw_ver, heartbeat, name,
address, phone, country, city, in csvreader:
_csv.Error: string with NUL bytes
Exit code: 1 , 0001h
--
http://mail.python.org/mailman/listinfo/python-list
fscked wrote:
> Anyone have an idea of what I might do to fix this? I have googled adn
> can only find some random conversations about it that doesn't make
> sense to me.
>
> I am basically reading in a csv file to create an xml and get this
> error.
>
> I don't see any empty values in any fields
Anyone have an idea of what I might do to fix this? I have googled adn
can only find some random conversations about it that doesn't make
sense to me.
I am basically reading in a csv file to create an xml and get this
error.
I don't see any empty values in any fields or anything...
--
http://ma
10 matches
Mail list logo