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

Problem Openrefine-client windows 7 #10

Closed Ernstson closed 4 years ago

Ernstson commented 4 years ago

I get the following error when i´m trying to something from the client in windows.

Traceback (most recent call last): File "refine.py", line 36, in File "google\refine__main.py", line 237, in main File "google\refine\cli.py", line 215, in ls File "google\refine\cli.py", line 215, in TypeError: 'NoneType' object has no attribute 'getitem__' [28732] Failed to execute script refine

felixlohmeier commented 4 years ago

Hi @Ernstson, could you please describe your environment? I have just tried the one-file-executable (openrefine-client_0-3-8_windows.exe --list) on a Windows 10 machine and could not reproduce the error message.

Ernstson commented 4 years ago

Hello! Many thanks for your reply, really appreciate it :) I’m running windows 7 64bit virtual machine on VMware.

felixlohmeier commented 4 years ago

The one-file-executable (openrefine-client_0-3-8_windows.exe) may be broken on Windows 7. I used pyinstaller on a Windows 10 machine to produce the one-file-executable. Maybe the python environment that was packaged by pyinstaller is not compatible with Windows 7. Unfortunately I don't have Windows 7 at hand to reproduce the error.

In the meantime... the python module should work on your Windows 7 machine:

  1. Download and install Python 2.7: https://www.python.org/downloads/release/python-2717/

  2. Install the module openrefine-client: python2 -m pip install openrefine-client --user (A command line script openrefine-client will also be installed.)

  3. Try openrefine-client --list

kiran1302 commented 4 years ago

I am running openrefine-client_0-3-8_windows with OpenRefine 3.3 on Windows 10 and i get this error when i try to create a project out of a CSV

openrefine-client_0-3-8_windows --create world_confirmed.csv Traceback (most recent call last): File "refine.py", line 36, in File "google\refine__main__.py", line 251, in main File "google\refine\cli.py", line 127, in create File "google\refine\refine.py", line 281, in new_project Exception: Project not created [17776] Failed to execute script refine

Please help me fix this.

However the openrefine-client_0-3-8_windows --list works fine and shows the list of projects. Do I need to install Python 2.7 or 3.7 explicitly?

felixlohmeier commented 4 years ago

@kiran1302, which version of OpenRefine do you use? Unfortunately the client does not yet support the current version 3.3 (#7). It should work up to OpenRefine 3.2.

Do I need to install Python 2.7 or 3.7 explicitly?

No, the one-file-executable (openrefine-client_0-3-8_windows.exe) contains an embedded Python 2.7 environment.

kiran1302 commented 4 years ago

Thanks for the quick response Felix. I will try with openrefine 3.2 and let you know if i face any issues

kiran1302 commented 4 years ago

Yes, it worked on v3.2 !! Thank you

felixlohmeier commented 4 years ago

Hi @Ernstson, I have just released a new version that should run on Windows 7. Would you like to try it out? I would appreciate your feedback. https://github.com/opencultureconsulting/openrefine-client/releases/download/v0.3.9/openrefine-client_0-3-9_windows.exe