Code Monkey home page Code Monkey logo

Comments (6)

pudo avatar pudo commented on July 22, 2024 4

Ok, so it looks like row._mapping doesn't exist in sqlalchemy 1.3, exists in 1.4 and will be the default in 2.0. I've added some crappy ImportError work-around now that should ensure it works with both 1.3 and 1.4.

from dataset.

yadalik avatar yadalik commented on July 22, 2024 1

Also got this after updating dataset to latest 1.5.1 on previously worked code, changing row._mapping.items() to row.items() helped, but then I reverted it back and tried just to update sqlalchemy to latest and error disappeared (sqlalchemy during update also cried about some incompatible version of marshmallow, so updated it too, not sure this important, just in case).

    if d := tt['text_merged_base'].find_one(image=image):
  File "...\lib\site-packages\dataset\table.py", line 649, in find_one
    for row in resiter:
  File "...\lib\site-packages\dataset\util.py", line 87, in __next__
    return convert_row(self.row_type, next(self._iter))
  File "...\lib\site-packages\dataset\util.py", line 17, in convert_row
    return row_type(row._mapping.items())
AttributeError: Could not locate column in row for column '_mapping'

P.S.: maybe some versions of supported libs should be changed, maybe this will help (yet I did not update things before in a long time, so maybe ranges of those libs could be expanded):
sqlalchamy updated from 1.3.19 to latest (current 1.4.28)

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
marshmallow-sqlalchemy 0.24.0 requires marshmallow>=3.0.0, but you have marshmallow 2.21.0 which is incompatible.

so marshmallow updated from 2.21.0 to latest (current 3.14.1)

from dataset.

ohld avatar ohld commented on July 22, 2024

Just received the same issue. Happened when updated to 1.5.1. @pudo

from dataset.

pudo avatar pudo commented on July 22, 2024

Yep it looks like SQLAlchemy 1.4 has introduced a new result type: https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.Result - I'm kind of tempted to start tagging the versions of SQLAlchemy that dataset will work with... Going to try and work out a fix now.

from dataset.

ohld avatar ohld commented on July 22, 2024

@pudo thanks for quick help!
Will you bump the updated version in pip?

from dataset.

pudo avatar pudo commented on July 22, 2024

should be available now :)

from dataset.

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.