okfn / docker-ckan

Docker images and Docker Compose setup for CKAN [Not Maintained]
GNU Affero General Public License v3.0
81 stars 91 forks source link

Script prerun.py crashes on initialization of ckan container #55

Closed nvnikolov closed 3 years ago

nvnikolov commented 3 years ago

Specifically, the following three lines of code are problematic.

Exception: expected a bytes-like object, str found - second parameter is empty string https://github.com/okfn/docker-ckan/blob/4262abe74289070ee7fc3948c2e799073f7e6320/ckan-base/2.9/setup/prerun.py#L120

No such command exists in the CLI as referred in https://github.com/okfn/docker-ckan/blob/4262abe74289070ee7fc3948c2e799073f7e6320/ckan-base/2.9/setup/prerun.py#L156 should be: command = ["ckan", "-c", ckan_ini, "user", "show", name]

subprocess.check_output returns a byte object https://github.com/okfn/docker-ckan/blob/4262abe74289070ee7fc3948c2e799073f7e6320/ckan-base/2.9/setup/prerun.py#L158

... after which this line crashes with the same exception as above: https://github.com/okfn/docker-ckan/blob/4262abe74289070ee7fc3948c2e799073f7e6320/ckan-base/2.9/setup/prerun.py#L159