Coder Social home page Coder Social logo

Comments (7)

marcoceppi avatar marcoceppi commented on July 28, 2024

This seems to be due to __getattr__, https://stackoverflow.com/a/25115607/196832

from asyncqlio.

marcoceppi avatar marcoceppi commented on July 28, 2024

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.

marcoceppi avatar marcoceppi commented on July 28, 2024

My table.metadata.bind is None leading to the attribute error of 'NoneType' object has no attribute 'dialect'

from asyncqlio.

marcoceppi avatar marcoceppi commented on July 28, 2024

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.

marcoceppi avatar marcoceppi commented on July 28, 2024

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.

Fuyukai avatar Fuyukai commented on July 28, 2024

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.

marcoceppi avatar marcoceppi commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.