pytools does not handle firebirdsql

Jan 30, 2013 at 3:51 PM

Hi,

 I came across a a requirement where I needed to pull some data from firebird database and push it into some file.

So I had to import firebirdsql module for python. 

firebirdsql import works when I run the script from python2.6 command prompt. However when I run it from visual studio IDE + python tools it complains that it can't import the module.

the error is :No module named fcntl

I googled a bit and found out that fcntl is a unix only module and firebirdsql tries to import it if present. if not present it throws ImportError and handles correctly.

Can anyone help me why firebirdsql module works on python command prompt and not on python tools for visual studio?

Thanks in advance for all the help.

Coordinator
Jan 30, 2013 at 4:34 PM

If you continue after the exception (and any subsequent exceptions) does it work? If so, you may be encountering this bug: http://pytools.codeplex.com/workitem/850 It's been fixed for our next release, and there are workarounds listed at the associated discussion (http://pytools.codeplex.com/discussions/398848) that may help you get going sooner.

If you can't continue after the exception, there's some other issue here so we'll have to look deeper. Since it works from the command line, it's most likely that you're just getting unnecessary errors from the debugger.

Jan 31, 2013 at 1:30 AM
Edited Jan 31, 2013 at 1:32 AM
Hi,
I can continue to work after this exception. As a matter of fact I never tried to check if it will work after the exception.

Thanks lot for your help.

..Manas
Coordinator
Jan 31, 2013 at 3:14 PM
The fix is entirely in visualstudio_py_debugger.py so you should just be able to grab the fixed version of that from http://pytools.codeplex.com/workitem/850 and drop it in your install directory.

That script was contributed by someone else, but it's likely that our checked in version has other changes that may not work without updating the binaries. But since it's all in Python, you can freely change your installed one to make it work (even while VS is running, just not while debugging).