Python - Descriptor 'split' requires a 'str' object but received a 'unicode'
<p>Erm, I have ready-to-use code, and I'm sure it really works, but I get the following error:</p>

<blockquote>
  <p>TypeError: descriptor 'split' requires a 'str' object but received a
  'unicode'</p>
</blockquote>

<p>That's the whole def:</p>

<pre><code>def assemblePacket(self, type):
    ipSplit = str.split(self.serverVars[0], '.')

    packet = 'SAMP'
    packet += chr(int(ipSplit[0]))
    packet += chr(int(ipSplit[1]))
    packet += chr(int(ipSplit[2]))
    packet += chr(int(ipSplit[3]))
    packet += chr(self.serverVars[1] &amp; 0xFF)
    packet += chr(self.serverVars[1] &gt;&gt; 8 &amp; 0xFF)
    packet += type

    return packet
</code></pre>

<p>And here is the problem:</p>

<pre><code>ipSplit = str.split(self.serverVars[0], '.')
</code></pre>

<p>I'm sure it's not because of the code, I've tried it before (the same script) and it worked. No idea why it doesn't now.And this "unicode" makes me think I have to change "str.split", but hmmm. Waiting for opinions :)</p>
