field_names error

72 views
Skip to first unread message

Adrian Klaver

unread,
May 8, 2012, 10:24:39 AM5/8/12
to datab...@googlegroups.com
I get the above error when using the records() to pull from either an
XLS or CSV source:

In [23]: recs=x.records()

In [24]: recs.next()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/aklaver/software_projects/production_database/ignore_dir/<ipython-input-24-80c5a01d2309>
in <module>()
----> 1 recs.next()

/usr/local/lib/python2.7/site-packages/brewery/ds/xls_streams.pyc in
records(self)
71
72 def records(self):
---> 73 fields = self.field_names
74 for row in self.rows():
75 yield dict(zip(fields, row))

AttributeError: 'XLSDataSource' object has no attribute 'field_names'


When I use rows() it works.

Thanks,
--
Adrian Klaver
adrian...@gmail.com

Stefan Urbanek

unread,
May 10, 2012, 4:51:55 AM5/10/12
to datab...@googlegroups.com
thanks for reporting. should be fixed now on Github. Let me know if there are still some issues.

Stefan
Stefan Urbanek
data analyst and data brewmaster

Twitter: @Stiivi
Home: http://stiivi.com
Brewery: http://databrewery.org
Github: https://github.com/Stiivi



Adrian Klaver

unread,
May 10, 2012, 10:17:48 AM5/10/12
to datab...@googlegroups.com, Stefan Urbanek
On 05/10/2012 01:51 AM, Stefan Urbanek wrote:
> thanks for reporting. should be fixed now on Github. Let me know if there are still some issues.

That fixed it.

FYI
From here:
http://packages.python.org/brewery/install.html#quick-start
"The project sources are stored in the Github repository."
points at cubes.

>
> Stefan
Reply all
Reply to author
Forward
0 new messages