OnroerendErfgoed / atramhasis

An online SKOS editor
http://atramhasis.readthedocs.io/
GNU General Public License v3.0
55 stars 11 forks source link

No session factory is configured... #901

Closed DavideLicheri closed 4 months ago

DavideLicheri commented 4 months ago

Hi Bram, I successfully update to Atramhasis==2.1.0 but the usual start procedure seems to fail. Here the details: (ubuntu 22.04, python3.10, atramhasis 2.1.0)

_"Traceback (most recent call last): File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/actions.py", line 307, in execute_actions callable(*args, **kw) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/init.py", line 75, in check_session_factory_set raise ValueError(msg) ValueError: No session factory is configured, and atramhasis.session_factory.secret setting is missing.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/amministratore/Envs/my_atramhasis/bin/pserve", line 8, in sys.exit(main()) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/scripts/pserve.py", line 30, in main return command.run() File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/scripts/pserve.py", line 271, in run app = loader.get_wsgi_app(app_name, config_vars) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/plaster_pastedeploy/init.py", line 111, in get_wsgi_app return loadapp( File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/paste/deploy/loadwsgi.py", line 246, in loadapp return loadobj(APP, uri, name=name, kw) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/paste/deploy/loadwsgi.py", line 271, in loadobj return context.create() File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/paste/deploy/loadwsgi.py", line 738, in create return self.object_type.invoke(self) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/paste/deploy/loadwsgi.py", line 136, in invoke return fix_call(context.object, context.global_conf, context.local_conf) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/paste/deploy/util.py", line 61, in fix_call val = callable(*args, *kw) File "/home/amministratore/ufficio34/atramhasis_scaffold/atramhasis_scaffold/init.py", line 28, in main return config.make_wsgi_app() File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/init.py", line 891, in make_wsgi_app self.commit() File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/actions.py", line 151, in commit self.action_state.execute_actions(introspector=self.introspector) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/actions.py", line 311, in execute_actions reraise( File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/util.py", line 732, in reraise raise value.with_traceback(tb) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/actions.py", line 307, in execute_actions callable(args, **kw) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/init.py", line 75, in check_session_factory_set raise ValueError(msg) pyramid.exceptions.ConfigurationExecutionError: <class 'ValueError'>: No session factory is configured, and atramhasis.sessionfactory.secret setting is missing. in: Line 0 of file None:"

Thanks for your suggestions!

davide

goessebr commented 4 months ago

Hi @DavideLicheri,

This issue was fixed via this pull request, but only for newly created scaffolds. You can apply the same fix to your existing atramhasis project.

By doing this, you will use the default session factory. Alternatively, you can choose your own session factory, but I noticed the documentation on customizing the session factory is outdated. I will keep this issue open and update the documentation sometime next week.

DavideLicheri commented 4 months ago

Hi @goessebr , ok, I fixed it with the default session factory. Now it's impossible to insert a manual ID in the +Add popup for a new concept/collection... Do you think I've to add a new issue?

goessebr commented 4 months ago

Yes, please add a new issue to separate these concerns. Thanks