Interface Error on Windows Only

Bug #661994 reported by Erik Kristensen
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Connector/Python
Fix Released
Undecided
Geert JM Vanderkelen

Bug Description

Python Version: 2.4.5 (embedded inside the application, cannot change this)

Basically this affects all windows systems, and I can't seem to figure out why.

Basically I am using the MythTV python bindings with your mysql library inside Boxee which is running python 2.4.5.

On all windows systems that have been tried, while I am pulling the recording information from the database through the library, an InterfaceError is thrown.

My project's issue is located here: http://github.com/ekristen/mythboxee/issues#issue/1

The most recent debug log for troubleshooting is located here: http://mythboxee.pastebin.com/HjR7miVD, if you look at line 323, it states "Failed executing the operation; Empty buffer.", can we get some clarification on this?

I am also printing out the sql queries being executed in that log as well.

Thank you for your time and help, I am sorry for the somewhat duplicate bug, I was unable to modify the other ticket for some reason, and that one was specific to an ampersand sign (which I thought was the culprit, but just happened to be a coincidence)

Thanks,
-Erik

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

Hello Erik,

For the record (from previous bug report):
* Using Python 2.4
* Using MySQL Connector/Python 0.1.0

Reading from that post, it happens on random queries, that's no good.

Could you edit the cursor.py and replace in the execute()-method:

        except StandardError, e:
            raise errors.InterfaceError(
                "Failed executing the operation; %s" % e)

with the following:

        except StandardError, e:
            raise errors.InterfaceError, errors.InterfaceError(
              "Failed executing the operation; %s" % e), sys.exc_info()[2]

Also, you need to import the sys module in cursor.py, somewhere at the
top it should look like this:

import sys
from collections import deque
import weakref

Rerun and check logs.
Longshot, but hopefully it might tell more.

Cheers,

Geert

Changed in myconnpy:
assignee: nobody → Geert JM Vanderkelen (geertjmvdk)
Revision history for this message
Erik Kristensen (unhandledexception) wrote :

A couple logs with the modified cursor file.

http://mythboxee.pastebin.com/eDn9ZGhF (line 286, is the InterfaceError)
http://mythboxee.pastebin.com/nkKCzVuT (line 387, is the InterfaceError)

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

Thanks for changing that code. I still don't know what the problem is, but here's the (edited) backtrace:

File "...\mysql\connector\cursor.py", line 321, in execute
 res = self.protocol.cmd_query(stmt)
File "...\mysql\connector\protocol.py", line 274, in cmd_query
 (nrflds, fields, eof) = self._handle_resultset(p)
File "...\mysql\connector\protocol.py", line 210, in _handle_resultset
 fields = self._handle_fields(nrflds)
File "...\mysql\connector\protocol.py", line 180, in _handle_fields
 fld = FieldPacket(buf)
File "...\mysql\connector\protocol.py", line 787, in __init__
 PacketIn.__init__(self, buf)
File "...\mysql\connector\protocol.py", line 501, in __init__
 self._parse()
File "...\mysql\connector\protocol.py", line 814, in _parse
 (buf,self.charset) = utils.read_int(buf, 2)
File "...\mysql\connector\utils.py", line 329, in read_int
 raise ValueError("Empty buffer.")
mysql.connector.errors.InterfaceError: Failed executing the operation; Empty buffer.

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

Hello Erik,

Fixing the code to support Python 2.4 takes less time. If you can, please
check out the code found here:
 https://code.launchpad.net/~geertjmvdk/myconnpy/0.3pre

It's the new release, but with Python v2.4 again supported. It would be
great if you could test that.

Cheers,
Geert

Revision history for this message
Erik Kristensen (unhandledexception) wrote : Re: [Bug 661994] Re: Interface Error on Windows Only

Awesome, I'll start testing it this evening!

-Erik

On Thu, Oct 21, 2010 at 7:30 AM, Geert JM Vanderkelen
<email address hidden> wrote:
> Hello Erik,
>
> Fixing the code to support Python 2.4 takes less time. If you can, please
> check out the code found here:
>  https://code.launchpad.net/~geertjmvdk/myconnpy/0.3pre
>
> It's the new release, but with Python v2.4 again supported. It would be
> great if you could test that.
>
> Cheers,
> Geert
>
> --
> Interface Error on Windows Only
> https://bugs.launchpad.net/bugs/661994
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in MySQL Connector/Python: New
>
> Bug description:
> Python Version: 2.4.5 (embedded inside the application, cannot change this)
>
> Basically this affects all windows systems, and I can't seem to figure out why.
>
> Basically I am using the MythTV python bindings with your mysql library inside Boxee which is running python 2.4.5.
>
> On all windows systems that have been tried, while I am pulling the recording information from the database through the library, an InterfaceError is thrown.
>
> My project's issue is located here: http://github.com/ekristen/mythboxee/issues#issue/1
>
> The most recent debug log for troubleshooting is located here: http://mythboxee.pastebin.com/HjR7miVD, if you look at line 323, it states "Failed executing the operation; Empty buffer.", can we get some clarification on this?
>
> I am also printing out the sql queries being executed in that log as well.
>
> Thank you for your time and help, I am sorry for the somewhat duplicate bug, I was unable to modify the other ticket for some reason, and that one was specific to an ampersand sign (which I thought was the culprit, but just happened to be a coincidence)
>
> Thanks,
> -Erik
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/myconnpy/+bug/661994/+subscribe
>

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

MySQL Connector/Python v0.3 should again work with Python v2.4.

If not, please open a new bug report.

Changed in myconnpy:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.