title: pycassa TypeError: A str or unicode, unable to do cassandra insert
body: <p>My scripting is python and cassandra is data stax community edition.</p>
  
  <pre><code>TypeError: A str or unicode value was expected, but int was received instead (3902503)
  </code></pre>
  
  <p>this is the error I'm getting while trying to insert into a cassandra column family.</p>
  
  <p>the code is like:</p>
  
  <pre><code>for x in feed:
      cf.insert(uuid.uuid4(), x)
  </code></pre>
  
  <p>x is a simple array in the form of "{key:value}"</p>
  
  <p>The error log suggests:</p>
  
  <pre><code>    Traceback (most recent call last):
        File "C:\Users\me\Desktop\pro1\src\pro1.py", line 73, in &lt;module&gt;
          str("swf"): str("aws")
        File "c:\Python27\lib\site-packages\pycassa\columnfamily.py", line 969, in insert
          mut_list = self._make_mutation_list(columns, timestamp, ttl)
        File "c:\Python27\lib\site-packages\pycassa\columnfamily.py", line 504, in _make_mutation_list
          columns.iteritems())
        File "c:\Python27\lib\site-packages\pycassa\columnfamily.py", line 503, in &lt;lambda&gt;
          return map(lambda (c, v): Mutation(self._make_cosc(_pack_name(c), _pack_value(v, c), timestamp, ttl)),
        File "c:\Python27\lib\site-packages\pycassa\columnfamily.py", line 462, in _pack_value
          return packer(value)
        File "c:\Python27\lib\site-packages\pycassa\marshal.py", line 231, in pack_bytes
          % (v.__class__.__name__, str(v)))
      TypeError: A str or unicode value was expected, but int was received instead (3902503)        
  </code></pre>
  
  <p>There seems to be something very minute I'm missing here... well thats why I came here to ask experts!</p>