Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: too many values to unpack #60

Closed
movermeyer opened this issue Aug 6, 2015 · 7 comments
Closed

ValueError: too many values to unpack #60

movermeyer opened this issue Aug 6, 2015 · 7 comments

Comments

@movermeyer
Copy link
Contributor

@movermeyer movermeyer commented Aug 6, 2015

Traceback (most recent call last):
  <some lines elided for privacy>
  File "C:\Python27\lib\site-packages\firebirdsql\fbcore.py", line 367, in fetchall
    return [tuple(r) for r in self._fetch_records]
  File "C:\Python27\lib\site-packages\firebirdsql\fbcore.py", line 192, in _fetch_generator
    stmt.handle, stmt.xsqlda)
ValueError: too many values to unpack

This is a result of this line in fbcore.py:

(rows, more_data) = connection._op_fetch_response(stmt.handle, stmt.xsqlda)

Which assumes that there are only 2 values returned. However, _op_fetch_response() can return 3 values since it can return the result of _parse_op_response() (line 780 of wireprotocol.py).

@nakagami
Copy link
Owner

@nakagami nakagami commented Aug 7, 2015

Thanks, I understand that code has something wrong.

I want test code, Can you show a sample code ?

@movermeyer
Copy link
Contributor Author

@movermeyer movermeyer commented Aug 7, 2015

I've managed to produce a simple enough test case that demonstrates the issue.

  1. Create a new database
  2. Run the SQL commands found here.
  3. Run the Python script found here against the database.

Note that it fails if you try to select more than 400 BLOBs.

Tested using

  • pyfirebirdsql 0.9.8
  • Firebird SQL 2.5.4.26856, 64 bit
nakagami added a commit that referenced this issue Aug 7, 2015
@nakagami
Copy link
Owner

@nakagami nakagami commented Aug 7, 2015

Thank you.
I have released 0.9.9 just now.
Please test with it.

@nakagami nakagami closed this Aug 8, 2015
@movermeyer
Copy link
Contributor Author

@movermeyer movermeyer commented Aug 10, 2015

The commit you made to fix this introduced an infinite loop.

  1. Create a new database
  2. Run the SQL commands found here.
  3. Run the Python script found here against the database.

Tested using

  • pyfirebirdsql 0.9.8
  • Firebird SQL 2.5.4.26856, 64 bit
  • Windows 7 Pro
@nakagami
Copy link
Owner

@nakagami nakagami commented Aug 10, 2015

I am certain of this problem.

@nakagami nakagami reopened this Aug 10, 2015
nakagami added a commit that referenced this issue Aug 10, 2015
@nakagami
Copy link
Owner

@nakagami nakagami commented Aug 11, 2015

Probably fixed at version 0.9.11
I want to know your result

@movermeyer
Copy link
Contributor Author

@movermeyer movermeyer commented Aug 11, 2015

It now seems to work. My program is once again working without issue (for the first time since before 0.9.2).

:)

@nakagami nakagami closed this Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.