Closed DavideLicheri closed 2 months ago
Hello Davide,
The atramhasis_scaffold_cookiecutter GitHub page is the right place to start building your own Atramhasis project. The bug you mentioned is also reported in this issue. You might try the suggested fix there, but I haven't tested it myself, so I can't guarantee it will work.
The good news: we're working on transitioning the build system from setuptools to hatch. Once completed, the cookiecutters will be directly available from Atramhasis via this link, and the bug should be resolved. The release is expected by the end of July.
I'll keep this issue open and notify you when the new release, with updated cookiecutters, is available. Thank you for your patience for the next few weeks.
Hello Bram, thank you very much for your kind suggestions! Trying to fix and waiting the end of July...
Davide
Hello Davide,
We are excited to announce the 2.1.0a2 alpha release, featuring new build methods and an improved approach to using cookiecutters. In this release, cookiecutters are now consolidated into a single repository, streamlining the project creation process.
Creating a New Project To create a new Atramhasis scaffold or a demo application, follow the respective guides below:
Empty Scaffold: Follow the steps outlined in the Creating Your Own Project section. Demo Application: Follow the instructions in the Demo Application section.
Installation Instructions
Since this is an alpha release, you may need to run an additional command after installing the development dependencies via
pip install -e .[dev]
. This will probably install atramhasis 2.0.0
Ensure you have the alpha release of Atramhasis installed: pip install atramhasis==2.1.0a2
Follow the remaining steps in the guides linked above to complete your setup.
Note: This is an alpha release. Over the coming weeks, we will be optimizing the application. In the meantime, we encourage you to try out the alpha release and provide feedback.
Ciao Bram, you succeeded long before the end of July! Very well done! The installation procedure is very easy and error-free on Ubuntu 22.04 with python3.10. Thank you very much because now I have a SKOS atramhasis server to work on... Davide
Hello Bram, I encountered some new problems using the Atramhasis_Scaffold interface: (Ubuntu 22.04, Python3.10, jinja2 version 3.1.4)
2024-07-12 14:16:14,642 ERROR [atramhasis.views.exception_views][waitress-1] 'pyramid.request.Request object' has no attribute 'session' Traceback (most recent call last): File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/tweens.py", line 41, in excview_tween response = handler(request) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/router.py", line 143, in handle_request response = _call_view( File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/view.py", line 674, in _call_view response = view_callable(context, request) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/views.py", line 170, in attr_view return view(context, request) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/config/views.py", line 196, in predicate_wrapper return view(context, request) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/viewderivers.py", line 450, in rendered_view response = view_renderer.render_view( File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/renderers.py", line 443, in render_view return self.render_to_response(response, system, request=request) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/renderers.py", line 466, in render_to_response result = self.render(value, system_values, request=request) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid/renderers.py", line 462, in render result = renderer(value, system_values) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/pyramid_jinja2/init.py", line 260, in call return template.render(system) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/jinja2/environment.py", line 939, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/templates/conceptscheme.jinja2", line 20, in top-level template code {% from "macros.jinja2" import File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/templates/layout.jinja2", line 1, in top-level template code {% extends "staticlayout-page.jinja2" %} File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/templates/staticlayout-page.jinja2", line 3, in top-level template code {% set app_name = app_name|default('Atramhasis') %} File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/templates/staticlayout.jinja2", line 42, in top-level template code {% block subfooter %} File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/templates/staticlayout-page.jinja2", line 23, in block 'subfooter' {% include 'subfooter-page.jinja2' %} File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/atramhasis/templates/subfooter-page.jinja2", line 14, in top-level template code {% for c in request.session['last_visited']|reverse() %} File "/home/amministratore/Envs/my_atramhasis/lib/python3.10/site-packages/jinja2/environment.py", line 468, in getitem return obj[argument] jinja2.exceptions.UndefinedError: 'pyramid.request.Request object' has no attribute 'session' 2024-07-12 14:16:14,691 INFO [sqlalchemy.engine.Engine][waitress-1] ROLLBACK
can you help me? Thank you!
Hello Davide,
it doesn't allow me to add concepts to the ConceptScheme defined between the Providers
Do you mean that the button to add concepts is disabled? In that case the problem is reported in #883
pressing "view" always give me a blank page for the session with the following error
I'm aware of this error. It was also reported last week in #891. I took a quick look at it last week but noticed a few things going wrong. This week, I will let my colleague, who is a Python expert, take a look at it.
Thanks for providing your feedback!
Hello @DavideLicheri,
We are happy to announce that version 2.1.0 of Atramhasis has been officially released today! You can find the release details here.
The latest version is now available on PyPI: Atramhasis on PyPI.
Please note that a few less urgent issues were left out of this release and will be addressed in future minor updates.
We encourage you to provide feedback if you encounter any issues, big or small.
Documentation: Creating a new atramhasis project: https://atramhasis.readthedocs.io/en/latest/customisation.html#creating-your-own-project. Creating an atramhasis demo project: https://atramhasis.readthedocs.io/en/latest/demo.html#running-a-demo-site-with-cookiecutter
Thank you Bram! Just a naive question: updating my atramhasis server with your new PyPI 2.1.0 release, I have to take some precaution on the DB to avoid losing concepts and collections? Thanks.
If you are updating from version 2.0.0 to 2.1.0, no additional steps are needed to update the database, and there is no risk of data loss. However, it is always wise to play it extra safe and back up your database before starting the update.
If you are updating from any 1.x.x versions, extra precautions are necessary, and backing up your database is strongly recommended. For detailed information on upgrading from 1.x.x to 2.x.x, please visit this link.
Dear, after a successful installation of Atramhasis server with data coming from Flanders Heritage Agency, I'm interested in a vanilla installation of the Atramhasis server on a Ubuntu 22.04 machine with python3.10. So I started from [atramhasis_scaffold_cookiecutter] Github page... Right? Following the instructions, I reach the final statement "pserve development.ini" but the SKOS server isn't running... This is the bash output:
amministratore@epepostgresdb:~/ufficio34/atramhasis_demo$ pserve development.ini Traceback (most recent call last): File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/config/actions.py", line 307, in execute_actions callable(*args, kw) File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid_jinja2/init.py", line 449, in register env = create_environment_from_options(env_opts, loader_opts) File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid_jinja2/init.py", line 401, in create_environment_from_options env = Environment(loader=loader, env_opts) File "/home/amministratore/.local/lib/python3.10/site-packages/jinja2/environment.py", line 363, in init self.extensions = load_extensions(self, extensions) File "/home/amministratore/.local/lib/python3.10/site-packages/jinja2/environment.py", line 117, in load_extensions extension = t.cast(t.Type["Extension"], import_string(extension)) File "/home/amministratore/.local/lib/python3.10/site-packages/jinja2/utils.py", line 149, in importstring return getattr(import(module, None, None, [obj]), obj) AttributeError: module 'jinja2.ext' has no attribute 'with'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/amministratore/.local/bin/pserve", line 8, in
sys.exit(main())
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/scripts/pserve.py", line 30, in main
return command.run()
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/scripts/pserve.py", line 271, in run
app = loader.get_wsgi_app(app_name, config_vars)
File "/usr/local/lib/python3.10/dist-packages/plaster_pastedeploy/init.py", line 111, in get_wsgi_app
return loadapp(
File "/usr/local/lib/python3.10/dist-packages/paste/deploy/loadwsgi.py", line 246, in loadapp
return loadobj(APP, uri, name=name, kw)
File "/usr/local/lib/python3.10/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
return context.create()
File "/usr/local/lib/python3.10/dist-packages/paste/deploy/loadwsgi.py", line 738, in create
return self.object_type.invoke(self)
File "/usr/local/lib/python3.10/dist-packages/paste/deploy/loadwsgi.py", line 136, in invoke
return fix_call(context.object, context.global_conf, context.local_conf)
File "/usr/local/lib/python3.10/dist-packages/paste/deploy/util.py", line 61, in fix_call
val = callable(*args, *kw)
File "/home/amministratore/ufficio34/atramhasis_demo/atramhasis_demo/init.py", line 51, in main
return config.make_wsgi_app()
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/config/init.py", line 891, in make_wsgi_app
self.commit()
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/config/actions.py", line 151, in commit
self.action_state.execute_actions(introspector=self.introspector)
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/config/actions.py", line 311, in execute_actions
reraise(
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/util.py", line 732, in reraise
raise value.with_traceback(tb)
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid/config/actions.py", line 307, in execute_actions
callable(args, kw)
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid_jinja2/init.py", line 449, in register
env = create_environment_from_options(env_opts, loader_opts)
File "/home/amministratore/.local/lib/python3.10/site-packages/pyramid_jinja2/init.py", line 401, in create_environment_from_options
env = Environment(loader=loader, env_opts)
File "/home/amministratore/.local/lib/python3.10/site-packages/jinja2/environment.py", line 363, in init
self.extensions = load_extensions(self, extensions)
File "/home/amministratore/.local/lib/python3.10/site-packages/jinja2/environment.py", line 117, in load_extensions
extension = t.cast(t.Type["Extension"], import_string(extension))
File "/home/amministratore/.local/lib/python3.10/site-packages/jinja2/utils.py", line 149, in importstring
return getattr(import(module, None, None, [obj]), obj)
pyramid.exceptions.ConfigurationExecutionError: <class 'AttributeError'>: module 'jinja2.ext' has no attribute 'with'
in:
Line 488 of file /home/amministratore/.local/lib/python3.10/site-packages/pyramid_jinja2/init.py:
config.add_jinja2_renderer(".jinja2", package=package)
Have someone of you some suggestions to solve my problem?
Many thanks in advance! Davide