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

Cannot delete project without columns #18

Open
ernestorefinepro opened this issue May 11, 2021 · 2 comments
Open

Cannot delete project without columns #18

ernestorefinepro opened this issue May 11, 2021 · 2 comments

Comments

@ernestorefinepro
Copy link

How to reproduce

  • Create a project from the clipboard with one column and one value EN.
  • Set the name to main_project
  • Once the project is created go to the column and remove it. This left the project without any columns
  • Execute ./openrefine-client --delete 'main_project' and you will see the following error:
./openrefine-client --delete 'main_project'
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 417, in get_models
KeyError: 'keyColumnName'
[1976071] Failed to execute script refine

Environment details

  • OpenRefine 3.4.1
  • OS: Ubuntu 20-04
  • Java: 1.8
@felixlohmeier
Copy link
Member

Hi @ernestorefinepro ,

The cause of this problem is probably 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 417, in get_models

You could test if the error does not occur with plain curl. Example for project id 1761702727570:

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?

@ernestorefinepro
Copy link
Author

With the curl command, the project can be deleted without issues.
For my case, the delete command error is an issue because I am automating the processing of several files with OpenRefine. The error creates some noise in the process.

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

No branches or pull requests

2 participants