Giving the correct failure info

11 views
Skip to first unread message

shawncrawley

unread,
Jun 15, 2017, 1:02:49 PM6/15/17
to Tethys Platform

When I ran
tethys syncstores myapp

I kept getting the error

tethys_apps.exceptions.PersistentStorePermissionError: Database user "tethys_super" has insufficient permissions to create the persistent store database "epanet_2.0": must have CREATE DATABASES permission at a minimum.

This was not true, so I went to the source code and had it print the actual error, rather than the assumed error, and I got this error instead:

tethys_apps.exceptions.PersistentStorePermissionError: (psycopg2.ProgrammingError) syntax error at or near ".0"
LINE 2: ...                           CREATE DATABASE epanet_epanet_2.0
                                                                     ^
 [SQL: "\n    CREATE DATABASE epanet_epanet_2.0\n       WITH OWNER tethys_super\n        TEMPLATE template0\n        ENCODING 'UTF8'\n         "]

Though this exposed my ignorance about naming a database with a period in it, it also exposes a potential barrier to useful feedback for the developer. Though I don't think this warrants any urgent changes, it is something that can be more fully considered as new code is being written.
Reply all
Reply to author
Forward
0 new messages