Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make computation of schema size more robust in case of error on psql request #1909

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

jocelynj
Copy link
Member

We have some errors like this one:

2023-06-15 20:39:36 cleaning :
Traceback (most recent call last):
  File "/data/project/osmose/backend/./osmose_run.py", line 600, in <module>
    sys.exit(main(options))
  File "/data/project/osmose/backend/./osmose_run.py", line 514, in main
    err_code |= run(country_conf, logger, analysers, options)
  File "/data/project/osmose/backend/./osmose_run.py", line 410, in run
    clean(conf, logger, options, osmosis_manager)
  File "/data/project/osmose/backend/./osmose_run.py", line 371, in clean
    osmosis_manager.clean_database(conf, options.no_clean or not conf.clean_at_end)
  File "/data/project/osmose/backend/modules/OsmOsisManager.py", line 294, in clean_database
    self.logger.sub().log("Schema size is: {} bytes ({})".format(schema_size, human_readable_size(schema_size)))
  File "/data/project/osmose/backend/modules/OsmOsisManager.py", line 285, in human_readable_size
    if size < 1024.0 or unit == 'PiB':
TypeError: '<' not supported between instances of 'NoneType' and 'float'

@jocelynj jocelynj requested a review from frodrigo June 16, 2023 18:47
@frodrigo frodrigo merged commit 34404d7 into osm-fr:dev Jun 17, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants