Closed tfidmmatthew closed 1 year ago
您好,感谢反馈。这个问题应该是最近我们一个主要依赖升级导致的问题。可以尝试运行下面的命令锁定sqlalchemy版本,之后运行paddlelabel
pip install sqlalchemy==1.4.46
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
INFO [paddlelabel.config.18]: Database path: sqlite:////Users/liveadmin/.paddlelabel/paddlelabel.db Traceback (most recent call last): File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/bin/paddlelabel", line 8, in
sys.exit(run())
^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/main.py", line 107, in run
from paddlelabel.api.controller.sample import prep_samples
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/api/controller/sample.py", line 8, in
from paddlelabel.api.schema import ProjectSchema
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/api/schema/init.py", line 1, in
from .project import ProjectSchema
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/paddlelabel/api/schema/project.py", line 10, in
class ProjectSchema(BaseSchema):
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/marshmallow/schema.py", line 121, in new
klass._declared_fields = mcs.get_declared_fields(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/marshmallow_sqlalchemy/schema.py", line 91, in get_declared_fields
fields.update(mcs.get_declared_sqla_fields(fields, converter, opts, dict_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/marshmallow_sqlalchemy/schema.py", line 130, in get_declared_sqla_fields
converter.fields_for_model(
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/marshmallow_sqlalchemy/convert.py", line 154, in fields_for_model
field = base_fields.get(key) or self.property2field(prop)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/marshmallow_sqlalchemy/convert.py", line 193, in property2field
field_class = field_class or self._get_field_class_for_property(prop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/marshmallow_sqlalchemy/convert.py", line 275, in _get_field_class_for_property
column = _base_column(prop.columns[0])
^^^^^^^^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 1329, in getattr
return self._fallback_getattr(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/liveadmin/opt/anaconda3/envs/paddlelabel/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 1298, in _fallback_getattr
raise AttributeError(key)
AttributeError: columns