[pypy-issue] Issue #2129: "local variable 'val' referenced before assignment" in lib_pypy/_sqlite3.py (pypy/pypy)

Valentin Lorentz issues-reply at bitbucket.org
Sat Aug 29 23:35:00 CEST 2015

New issue 2129: "local variable 'val' referenced before assignment" in lib_pypy/_sqlite3.py

Valentin Lorentz:

<pre>  File "/opt/python/pypy3-2.4.0/lib_pypy/_sqlite3.py", line 915, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/python/pypy3-2.4.0/lib_pypy/_sqlite3.py", line 1084, in execute
    return self.__execute(False, sql, [params])
  File "/opt/python/pypy3-2.4.0/lib_pypy/_sqlite3.py", line 1051, in __execute
    self.__next_row = self.__fetch_one_row()
  File "/opt/python/pypy3-2.4.0/lib_pypy/_sqlite3.py", line 1004, in __fetch_one_row
UnboundLocalError: local variable 'val' referenced before assignment

I get this bug with Pypy3 2.4.0, but not with Pypy 2.5.0

I'm sorry, but I can't give you a small code to reproduce this bug, because I only get it on Travis CI and when running all of my test cases; in addition to it being random.

If you want to try it:

git clone https://github.com/ProgVal/Limnoria.git
cd Limnoria
pypy3 setup.py install --user
pypy3 `which supybot-test` -v test --plugins-dir=./build/lib*/supybot/plugins/ --no-network --disable-multiprocessing --exclude=./build/lib*/supybot/plugins/Scheduler --exclude=./build/lib*/supybot/plugins/Filter

You can also try this:

pypy3 `which supybot-test` -v plugins/Aka/

but it does not seem to trigger the bug.

More information about the pypy-issue mailing list