You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sqlalchemy 1.4.0b1 was released recently, in many ways attempting to serve as a potential migration point for a more dramatic series of API changes currently planned for release 2.0 of SQLAlchemy. The beta version can be installed by passing --pre flag when installing the library, such as:
py -m pip install --pre sqlalchemy
See issue #38 for my test case, with the following changes:
using sqlalchemy version 1.4.0b1 instead of version 1.3.20
My flask client
fromflaskimportFlaskfromflask_graphqlimportGraphQLViewapp=Flask(__name__)
app.debug=Trueapp.add_url_rule(
'/graphql',
view_func=GraphQLView.as_view(
'graphql',
schema=schema,
graphiql=True# for having the GraphiQL interface
)
)
@app.teardown_appcontextdefshutdown_session(exception=None):
db_session.remove()
if__name__=='__main__':
# for this to work in jupyter notebookfromwerkzeug.servingimportrun_simplerun_simple('localhost', 9000, app)
An error occurred while resolving field SongNode.tags
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 324, in _get_or_create_data_loader
current_data_loader: ModelLoader = data_loaders[data_loader_key]
KeyError: ('allSongs', 'edges', 'node', 'tags')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1104, in __getattr__
return self._index[key]
KeyError: 'items'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executors\sync.py", line 16, in execute
return fn(*args, **kwargs)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 356, in connection_resolver
data_loader: ModelLoader = cls._get_or_create_data_loader(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 326, in _get_or_create_data_loader
current_data_loader = ModelLoader(type(root), model, info, args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 137, in __init__
self.parent_model_pks: 'Tuple[str, ...]' = self._get_model_pks(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 197, in _get_model_pks
for name, c in inspection.inspect(model).columns.items()
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1106, in __getattr__
util.raise_(AttributeError(key), replace_context=err)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\util\compat.py", line 180, in raise_
raise exception
AttributeError: items
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executors\sync.py", line 16, in execute
return fn(*args, **kwargs)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 356, in connection_resolver
data_loader: ModelLoader = cls._get_or_create_data_loader(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 326, in _get_or_create_data_loader
current_data_loader = ModelLoader(type(root), model, info, args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 137, in __init__
self.parent_model_pks: 'Tuple[str, ...]' = self._get_model_pks(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 197, in _get_model_pks
for name, c in inspection.inspect(model).columns.items()
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1106, in __getattr__
util.raise_(AttributeError(key), replace_context=err)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\util\compat.py", line 180, in raise_
raise exception
graphql.error.located_error.GraphQLLocatedError: items
An error occurred while resolving field SongNode.tags
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 324, in _get_or_create_data_loader
current_data_loader: ModelLoader = data_loaders[data_loader_key]
KeyError: ('allSongs', 'edges', 'node', 'tags')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1104, in __getattr__
return self._index[key]
KeyError: 'items'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executors\sync.py", line 16, in execute
return fn(*args, **kwargs)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 356, in connection_resolver
data_loader: ModelLoader = cls._get_or_create_data_loader(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 326, in _get_or_create_data_loader
current_data_loader = ModelLoader(type(root), model, info, args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 137, in __init__
self.parent_model_pks: 'Tuple[str, ...]' = self._get_model_pks(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 197, in _get_model_pks
for name, c in inspection.inspect(model).columns.items()
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1106, in __getattr__
util.raise_(AttributeError(key), replace_context=err)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\util\compat.py", line 180, in raise_
raise exception
AttributeError: items
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executors\sync.py", line 16, in execute
return fn(*args, **kwargs)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 356, in connection_resolver
data_loader: ModelLoader = cls._get_or_create_data_loader(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 326, in _get_or_create_data_loader
current_data_loader = ModelLoader(type(root), model, info, args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 137, in __init__
self.parent_model_pks: 'Tuple[str, ...]' = self._get_model_pks(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 197, in _get_model_pks
for name, c in inspection.inspect(model).columns.items()
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1106, in __getattr__
util.raise_(AttributeError(key), replace_context=err)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\util\compat.py", line 180, in raise_
raise exception
graphql.error.located_error.GraphQLLocatedError: items
An error occurred while resolving field SongNode.tags
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 324, in _get_or_create_data_loader
current_data_loader: ModelLoader = data_loaders[data_loader_key]
KeyError: ('allSongs', 'edges', 'node', 'tags')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1104, in __getattr__
return self._index[key]
KeyError: 'items'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executors\sync.py", line 16, in execute
return fn(*args, **kwargs)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 356, in connection_resolver
data_loader: ModelLoader = cls._get_or_create_data_loader(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 326, in _get_or_create_data_loader
current_data_loader = ModelLoader(type(root), model, info, args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 137, in __init__
self.parent_model_pks: 'Tuple[str, ...]' = self._get_model_pks(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 197, in _get_model_pks
for name, c in inspection.inspect(model).columns.items()
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1106, in __getattr__
util.raise_(AttributeError(key), replace_context=err)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\util\compat.py", line 180, in raise_
raise exception
AttributeError: items
Traceback (most recent call last):
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphql\execution\executors\sync.py", line 16, in execute
return fn(*args, **kwargs)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 356, in connection_resolver
data_loader: ModelLoader = cls._get_or_create_data_loader(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 326, in _get_or_create_data_loader
current_data_loader = ModelLoader(type(root), model, info, args)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 137, in __init__
self.parent_model_pks: 'Tuple[str, ...]' = self._get_model_pks(
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\graphene_sqlalchemy_filter\connection_field.py", line 197, in _get_model_pks
for name, c in inspection.inspect(model).columns.items()
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\sql\base.py", line 1106, in __getattr__
util.raise_(AttributeError(key), replace_context=err)
File "c:\users\geoffrey\appdata\local\programs\python\python38\lib\site-packages\sqlalchemy\util\compat.py", line 180, in raise_
raise exception
graphql.error.located_error.GraphQLLocatedError: items
I feel like this may be related to #38 but I'm not sure, opening a separate issue just in case.
The text was updated successfully, but these errors were encountered:
sqlalchemy 1.4.0b1 was released recently,
in many ways attempting to serve as a potential migration point for a more dramatic series of API changes currently planned for release 2.0 of SQLAlchemy
. The beta version can be installed by passing--pre
flag when installing the library, such as:See issue #38 for my test case, with the following changes:
using sqlalchemy version 1.4.0b1 instead of version 1.3.20
My flask client
test query
error in response
server side error
I feel like this may be related to #38 but I'm not sure, opening a separate issue just in case.
The text was updated successfully, but these errors were encountered: