Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Cannot delete project if corrupted #16

Open
magdmartin opened this issue Feb 2, 2021 · 1 comment
Open

Cannot delete project if corrupted #16

magdmartin opened this issue Feb 2, 2021 · 1 comment

Comments

@magdmartin
Copy link

I can delete corrupted project from OpenRefine interface but not using the openrefine-client. I have the following error:

Traceback (most recent call last):
  File "/home/felix/openrefine-client/refine.py", line 35, in <module>
  File "/home/felix/openrefine-client/google/refine/__main__.py", line 256, in main
  File "/home/felix/openrefine-client/google/refine/cli.py", line 140, in delete
  File "/home/felix/openrefine-client/google/refine/refine.py", line 371, in __init__
  File "/home/felix/openrefine-client/google/refine/refine.py", line 409, in get_models
  File "/home/felix/openrefine-client/google/refine/refine.py", line 395, in do_json
  File "/home/felix/openrefine-client/google/refine/refine.py", line 114, in urlopen_json
  File "/home/felix/openrefine-client/google/refine/refine.py", line 100, in urlopen
Exception: HTTP 500 "Failed to find project id #2603132304878 - may be corrupt" for http://127.0.0.1:3333/command/core/get-models?project=2603132304878&csrf_token=hD0LqXzZcuNH3vc6RsNgy3yGwFFvE6Vp
	{}
[31739] Failed to execute script refine

Using

  • openrefine-client_0-3-10_linux
  • OpenRefine 3.4.1
@felixlohmeier
Copy link
Member

Hi @magdmartin,

I don't know exactly how to reproduce the error. Projects detected as "corrupted" at startup are renamed in the workspace directory (e.g. 1761702727570.project.corrupted) and are then no longer visible via the OpenRefine interface, right? Do you have a hint how I can create a fresh corrupted project for testing? :-)

The difference to the OpenRefine interface could be the initialization of the project via the RefineProject() class in the delete() function which triggers get_models(). That would be this line in the log:

File "/home/felix/openrefine-client/google/refine/refine.py", line 409, in get_models

We could test if the error does not occur with plain curl. Note to self:

curl --data project="1761702727570" "http://localhost:3333/command/core/delete-project?csrf_token=$(curl -s http://localhost:3333/command/core/get-csrf-token | cut -d '"' -f 4)"

Is this error an important problem for your use case or did you just want to let me know?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants