0

Trying to load csv file to hbase and but while running getting error :

Versions used :

Happybase 0.9

Python 2.6.6

MapRDB

TypeError: expecting tuple of size 3 for list/set type args

Below is code used

import csv
import happybase

# CSV file of customer records -- change me
f = '/mapr/demo.mapr.com/project/cust.csv'

ufile = open(f)
reader = csv.DictReader(ufile)
conn = happybase.Connection('localhost')
table = conn.table('cust_table')

print "reading customer file %s" % f
i = 0
for row in reader:
    i += 1
    table.put(row['CustID'],
        {'cdata:name': row['Name'],
         'cdata:gender': row['Gender'],
         'cdata:address': row['Address'],
         'cdata:zip': row['zip'],
         'cdata:signdate': row['SignDate'],
         'cdata:status': row['Status'],
         'cdata:level': row['Level'],
         'cdata:campaign': row['Campaign'],
#         'cdata:linked_with_apps': row['LinkedWithApps']
})
print "loaded cust db with %d entries" % i

Screenshot error : enter image description here

Any help would be appreciated.

marjun
  • 696
  • 5
  • 17
  • 30

1 Answers1

0

try downgrading the thrift library.

https://github.com/wbolster/happybase/issues/154

btw, the right place for bug reports is on github, not on stackoverflow.

wouter bolsterlee
  • 3,879
  • 22
  • 30