nens / threedi-schema

The schema of 3Di schematization files
MIT License
0 stars 0 forks source link

Error during convert to geopackage #122

Open leendertvanwolfswinkel opened 1 month ago

leendertvanwolfswinkel commented 1 month ago

I did

schema.upgrade(backup=False, upgrade_spatialite_version=True)
schema.convert_to_geopackage()

On this spatialite: staging-test-0d1d2d-simple-infiltration.zip

And it gave me this error:

Traceback (most recent call last):
  File "C:\Users\leendert.vanwolfswin\Documents\migration_checker\migration_checker.py", line 35, in migrate_spatialite
    schema.validate_schema()
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\Python\Python311\site-packages\threedi_schema\application\schema.py", line 151, in validate_schema
    raise MigrationMissingError(
threedi_schema.application.errors.MigrationMissingError: This tool requires at least schema version 228. Current version: 219.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\leendert.vanwolfswin\Documents\migration_checker\migration_checker.py", line 42, in migrate_spatialite
    schema.convert_to_geopackage()
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\Python\Python311\site-packages\threedi_schema\application\schema.py", line 280, in convert_to_geopackage
    [out_list[idx].decode("utf-8") for idx in unexpected_error_indices]
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\Python\Python311\site-packages\threedi_schema\application\schema.py", line 280, in <listcomp>
    [out_list[idx].decode("utf-8") for idx in unexpected_error_indices]
     ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?