RWTH-IAEW / cimpyorm

Python ORM middleware for IEC CIM and CGMES datasets
http://www.iaew.rwth-aachen.de
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

TypeError: declarative_base() takes 0 positional arguments but 1 was given #16

Closed ChristianFGH closed 4 months ago

ChristianFGH commented 5 months ago

Hey there,

i wanted to use cimpyorm to read out some CGMES grid data and modify them in python, but i was not able to run the program. I am using a windows machine with python 3.10.11 and cimpyorm 10.1. When i execute following code:

import cimpyorm

if __name__ == "__main__":
    test2, model = cimpyorm.parse(r"grid_data/Export.xml")

an error occurs. It says:

TypeError: declarative_base() takes 0 positional arguments but 1 was given

as in the Title of this issue. I also checked using python 3.9 and 3.11, with the same results.

tuscaonline commented 5 months ago

Hi, I add sqlalchemy = "<=1.3.15" into my requierement file. and it work for me.

ChristianFGH commented 4 months ago

Hey, thank you very much, that solved the problem.