Comments (7)
This seems to be due to __getattr__
, https://stackoverflow.com/a/25115607/196832
from asyncqlio.
Ugh, it's even worse. Based on this http://blog.devork.be/2011/06/using-getattr-and-property_17.html and some monkey patching the dep in my virtualenv, something in autoincrement
property is raising AttributeError
which obscures what is raising the error.
from asyncqlio.
My table.metadata.bind
is None
leading to the attribute error of 'NoneType' object has no attribute 'dialect'
from asyncqlio.
This seems to stem from the fact that I don't invoke db.bind_tables
. However, after doing so get errors during table binding:
Traceback (most recent call last):
File "server.py", line 119, in <module>
loop.run_until_complete(init_db(app))
File "/usr/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
return future.result()
File "app/utils/middleware.py", line 19, in init_db
app['db'].bind_tables(models.Meeting.metadata)
File ".venv/lib/python3.6/site-packages/asyncqlio/db.py", line 108, in bind_tables
md.setup_tables()
File ".venv/lib/python3.6/site-packages/asyncqlio/orm/schema/table.py", line 82, in setup_tables
self.resolve_floating_relationships()
File ".venv/lib/python3.6/site-packages/asyncqlio/orm/schema/table.py", line 154, in resolve_floating_relationships
table, column = foreignkey._f_name.split(".")
File ".venv/lib/python3.6/site-packages/asyncqlio/orm/schema/column.py", line 188, in __getattr__
item)) from None
AttributeError: Column object 'id' has no attribute '_f_name'
from asyncqlio.
There was a typo in a Table definition that wasn't being bound but showed up anyways during rendering. This was a rabbit hole, but binding tables isn't really well documented - which is my take away.
from asyncqlio.
Yeah, unfortunately documentation isn't really the strong point (or any point) of the library. I intended to do more at some point but I started working on other projects and it got pushed down my todo-list.
from asyncqlio.
That's fine, I've been searching for a good async SQLAlchemy library. The last one I landed on, peewee_async left me wanting more. There's a lot of promise in this library so I intend to keep fighting my way through 😀
from asyncqlio.
Related Issues (20)
- Table truncation
- Table.set
- Columns fail to autoincrement HOT 3
- ddlsession.create_table does not create a table HOT 3
- Properly trap exceptions
- Track history for rows that haven't been loaded HOT 1
- Implement UPSERT
- History API
- Broken transactions don't always close properly
- DDL statements
- AttributeError: module 'asyncqlio.backends.mysql' has no attribute 'MysqlDialect' HOT 1
- Column.ilike results in AttributeError on Column.bind
- TIMESTAMP is not equal between PSQL and MySQL HOT 2
- Include decimal, double, numeric definitions HOT 1
- Column.with_name doesn't operate as expected HOT 7
- Replace `warnings` module with `logging.warn` HOT 2
- Associative table relationships? HOT 2
- Datetime column type
- `and` in `sess.select` ignores all but last comparison HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asyncqlio.