AttributeError after upgrading to 1.3.13
See original GitHub issueI don’t know if this somehow affects the problem, but I use Flask-SQLAlchemy.
The part of code is as follows:
note = Note.query.options(noload('*')).with_for_update(of=Note).get_or_404(note_id)
db.session.refresh(note)
After upgrading SQLAlchemy version from 1.3.12 to 1.3.13 I got the following exception traceback:
File " /home/decaz/workspace/project/views.py", line 432, in post
db.session.refresh(note)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/scoping.py", line 162, in do
return getattr(self.registry(), name)(*args, **kwargs)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1675, in refresh
loading.load_on_ident(
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 198, in load_on_ident
return load_on_pk_identity(
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 284, in load_on_pk_identity
return q.one()
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3347, in one
ret = self.one_or_none()
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3316, in one_or_none
ret = list(self)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 101, in instances
util.raise_from_cause(err)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 153, in reraise
raise value
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 81, in instances
rows = [proc(row) for row in fetch]
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 81, in <listcomp>
rows = [proc(row) for row in fetch]
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 565, in _instance
_populate_full(
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 730, in _populate_full
populator(state, dict_, row)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 2031, in load_collection_from_joined_existing_row
inst = _instance(row)
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 565, in _instance
_populate_full(
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 709, in _populate_full
elif load_path != state.load_path:
File " /home/decaz/workspace/project/.venv/lib/python3.8/site-packages/sqlalchemy/orm/path_registry.py", line 63, in __eq__
return other is not None and self.path == other.path
AttributeError: 'tuple' object has no attribute 'path'
@zzzeek unfortunately, right now I don’t have time to prepare an example that reproduces the problem, but I hope you’ll be able to understand what is the reason.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Django - installing mysqlclient error: mysqlclient 1.3.13 or ...
Go to your django/db/backends/mysql installation dir. Check your path in the error message. I'm using pipenv so my path is: /home/username/ ...
Read more >AttributeError: 'EntryPoint' object has no attribute '_key', stops ...
After a while the computation stops with the message AttributeError: 'EntryPoint' object has no attribute '_key .
Read more >AttributeError: 'module' object has no attribute and ImportError
This video covers the AttributeError : 'module' object has no attribute and ImportError: No module name errors in Python.
Read more >AttributeError: module 'natsort' has no attribute 'compat'
After installing the new env, it gave me this following error: Mac OS X: ValueError: unknown locale: UTF-8 in Python that I fixed...
Read more >Attribute Error while using networkx ... - Google Groups
write_gpickle(<filename>). I retrieved these graphs in another of my python programs using networkx.read_gpickle(<filename>,<format type>). Then I try ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK so I really do not want to encourage bug reports like these. the stack trace is helpful but if you can at least share the mappings, that will save me a lot of time. This is reproducible as I stepped through the stack trace and attempted to reproduce the conditions at each step and I then got a bit lucky on a few guesses. here is the test case, bisection coming next.
Thank you. I misinterpreted sqlalchemy-bot closed this in f5eeac3 19 days ago as being fixed in 1.3.13. Thank you for the clarification.