[pypy-issue] [issue1440] "import sqlite3" fails on win32

mattip tracker at bugs.pypy.org
Sun Apr 7 21:22:55 CEST 2013


New submission from mattip <matti.picus at gmail.com>:

import sqlite3 fails in latest win32 beta release

pypy-2.0-beta2\pypy.exe
Python 2.7.3 (3eef596df459, Apr 06 2013, 12:40:10)
[PyPy 2.0.0-beta2 with MSC v.1500 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``in theory there is the Loop, in
practice there are bridges''
>>>> import sqlite3
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Users\matti\pypy_stuff\pypy-2.0-beta2\lib-
python\2.7\sqlite3\__init__.py", line 24, in <module>
    from dbapi2 import *
  File "C:\Users\matti\pypy_stuff\pypy-2.0-beta2\lib-
python\2.7\sqlite3\dbapi2.py", line 27, in <module>
    from _sqlite3 import *
  File "C:\Users\matti\pypy_stuff\pypy-2.0-beta2\lib_pypy\_sqlite3.py", line 
262, in <module>
    if _has_load_extension():
  File "C:\Users\matti\pypy_stuff\pypy-2.0-beta2\lib_pypy\_sqlite3.py", line 
259, in _has_load_extension
    unverified_lib = unverified_ffi.dlopen('sqlite3')
  File "C:\Users\matti\pypy_stuff\pypy-2.0-beta2\lib_pypy\cffi\api.py", line 
111, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "C:\Users\matti\pypy_stuff\pypy-2.0-beta2\lib_pypy\cffi\api.py", line 
364, in _make_ffi_library
    raise OSError("library not found: %r" % (name,))
OSError: library not found: 'sqlite3'
>>>>

But if I comment out the name test in _make_ffi_library in api.py all is good.

    backend = ffi._backend
    try:
        #if '.' not in name and '/' not in name:
        #    raise OSError
        backendlib = backend.load_library(name, flags)
    except OSError:

Why don't we just let backend.load_library do it's thing?

----------
messages: 5541
nosy: mattip, pypy-issue
priority: bug
status: unread
title: "import sqlite3" fails on win32

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1440>
________________________________________


More information about the pypy-issue mailing list