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

toep: scenario bundle won't save #1464

Closed
1 task
han-f opened this issue Nov 8, 2023 · 11 comments
Closed
1 task

toep: scenario bundle won't save #1464

han-f opened this issue Nov 8, 2023 · 11 comments
Assignees
Labels

Comments

@han-f
Copy link
Contributor

han-f commented Nov 8, 2023

Description of the issue

I created a new scenario bundle. I successfully saved the "basic information", but any other edits seem to produce an endless "saving wheel"

Steps to Reproduce

  1. Create new scenario bundle
  2. Edit basic information - > save
  3. Edit an other information -> try to save

Ideas of solution

?

Context and Environment

  • Version used:
  • Operating system: Windows 10
  • Browser: Firefox

Workflow checklist

@adelmemariani
Copy link
Contributor

Thank you @han-f for highlighting this issue. I reproduced the error. While the "saving weel" never ended, the bundle is saved in the background. The main reason of this error is that the update method has changed in the bundles because of the new way of storing the history of the oekg: #1448. As this is a newly added feature, it is currently experiencing some bugs. I will investigate more and fix this issue. The production server is functioning properly since the "history" feature has not been applied there. Adding bundles to the real oep seems to be a good idea.

@adelmemariani
Copy link
Contributor

Update: It seems the problem is not related to the code but it is related to the Python version and the packages installed on the server.

@jh-RLI
Copy link
Contributor

jh-RLI commented Nov 8, 2023

Thanks for looking into this @adelmemariani we would need to fix this bug to deploy the release on Monday, do you think we can fix it? If it's related to the python version, we might have to remove the history updates because we can't update the python version :/

@adelmemariani
Copy link
Contributor

@jh-RLI I think it is related to the rdflib package, but we may need to upgrade the Python as well. I am trying to see if upgrading the pip and python is possible during the remaining time before our release.

@adelmemariani
Copy link
Contributor

adelmemariani commented Nov 8, 2023

In the bundle update code, I used the JSON-LD format to serialize the modifications in the OEKG.

As explained here JSON-LD has been incorporated into RDFLib since v6.0.0.

And RDFLib v6.0.0 needs Python version >=3.7. But the server has Python 3.6.7

I will try to find a solution.

@adelmemariani
Copy link
Contributor

Solved!

I changed the code to use another serialization. The bundle update now works and the modifications can be seen here.

@jh-RLI
Copy link
Contributor

jh-RLI commented Nov 8, 2023

Great!!! Are there any downsides to this solution?
It would still be good if we could just update the Python version. But I don't have much hope that we will be allowed to do this.

@jh-RLI
Copy link
Contributor

jh-RLI commented Nov 8, 2023

Please also add this fix to the development branch by creating a new branch and a pull request :) You can reference this issue in the branch name and in the commit messages.

@adelmemariani
Copy link
Contributor

adelmemariani commented Nov 8, 2023

Great!!! Are there any downsides to this solution? It would still be good if we could just update the Python version. But I don't have much hope that we will be allowed to do this.

Since we have to use RDFLib version 5.0.0 and the current version of the RDFLib is 7.0.0, we can not store the modifications as JSON-LD objects. The model.py in our Django app uses JSONField() for the modifications and since a JSON object is not an option for us, I had to use the NTSerializer and convert the outcome to string and store them like here, which might not be as readable as JSON-LD format.

@adelmemariani
Copy link
Contributor

adelmemariani commented Nov 8, 2023

I think it is a temporary solution. Storing JSON objects makes it easier to undo the changes, but currently, we store strings and it makes it difficult to extract values for rolling back the OEKG to a previous state. We should upgrade Python in the future.

@jh-RLI
Copy link
Contributor

jh-RLI commented Nov 10, 2023

I will close this issue as the issue was solved. @adelmemariani to save some time on monday it would be great if this fix is already submitted as PR to develop branch i think there is none so far? :)

@jh-RLI jh-RLI closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants