question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Facing issue by using yield_per

See original GitHub issue

DB: mysql:5.7.0

instances = session.query(Model.id, Model.some_value).yield_per(magic_number).enable_eagerloads(false)

Base on diff magic_number such as 81 or 101 and so on, will raise.

Traceback (most recent call last):
  File "sqlalchemy_py/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "sqlalchemy_py/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 189, in execute
    while self.nextset():
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 142, in nextset
    nr = db.next_result()
_mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now")

any idea? thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
zzzeekcommented, Jan 17, 2020

since this is now tested and understood, a workaround is posted on the wiki, thanks for your patience.

0reactions
vimiPonyaicommented, Jan 17, 2020

@zzzeek Thanks your explain and your util function.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Estimation of Maize (Zea mays L.) Yield Per Harvest Area - MDPI
Maize grain yield is normally highly and positively correlated with kernel numbers. The number of kernels per plant depends on the number of...
Read more >
Green Revolution: Impacts, limits, and the path ahead - PNAS
Developing country agriculture is faced with a growing set of challenges: meeting the demands of diet diversity resulting from rapidly rising incomes; ...
Read more >
Improving crop productivity and resource use efficiency to ...
The paper provides a perspective on the challenge faced by science and technology in agriculture which must be met both in terms of...
Read more >
Crop Commodity Programs - USDA ERS
Provides benefits based on price or revenue targets for producers of corn and other feed grains, wheat, rice, soybeans and other oilseeds, ...
Read more >
Problems Faced by Farmers in India - PSCNOTES.IN
Major Problems faced by farmers in India are as follows. Unavailability of good quality of Seeds; Lack of Modern Equipment; Poor irrigation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found