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

Raised StopIteration on insert #27

Closed
sdrenn opened this issue Aug 17, 2018 · 4 comments
Closed

Raised StopIteration on insert #27

sdrenn opened this issue Aug 17, 2018 · 4 comments

Comments

@sdrenn
Copy link

sdrenn commented Aug 17, 2018

When I execute code like this

engine = create_engine(db_opt)
Session = sessionmaker(bind=engine)
session = Session()
item = Item(data='test')
session.add(item)
session.flush()

the following error appears:

RuntimeError: generator raised StopIteration

I'm using Python 3.7. On 3.6 it works fine.
Looks like it's because of how Python 3.7 handles StopIteration:
https://www.python.org/dev/peps/pep-0479/

Full error log: error.log

@xzkostyan
Copy link
Owner

Fixed in version 0.0.8.

@ghost
Copy link

ghost commented Apr 26, 2019

It looks like the issue is still here with version 0.0.10 and Python 3.7.3.

@xzkostyan
Copy link
Owner

@a-rodin please provide some example to reproduce this error.

@ghost
Copy link

ghost commented Jun 2, 2019

@xzkostyan I actually encounter the error when I use clickhouse-sqlalchemy with IPython SQL magic. When I try run magic like

%%sql
drop table if exists my_table_to_drop;

then it works fine on Python 3.6 (no results returned) and raises a StopIteration error on Python 3.7.

It believe that it is not an issue of of IPython SQL magic, because the similar query works fine with SQLite and Python 3.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants