opencultureconsulting / openrefine-client

The OpenRefine Python Client from Paul Makepeace provides a library for communicating with an OpenRefine server. This fork extends the command line interface (CLI) and is distributed as a convenient one-file-executable (Windows, Linux, Mac). It is also available via Docker Hub, PyPI and Binder.
GNU General Public License v3.0
83 stars 19 forks source link

Cannot delete project without columns #18

Open ernestorefinepro opened 3 years ago

ernestorefinepro commented 3 years ago

How to reproduce

Environment details

felixlohmeier commented 3 years ago

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 commented 3 years ago

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.