UB-Mannheim / RaiseWikibase

Knowledge graph construction: Fast inserts into a Wikibase instance
https://ub-mannheim.github.io/RaiseWikibase/
MIT License
45 stars 7 forks source link

docker.py uses wrong container name #13

Closed MHuberFaust closed 2 years ago

MHuberFaust commented 2 years ago

Hi, I freshly installed RaiseWikibase and could not use the scripts properly. After a while I found the problem:

Container names have hyphens in their name.

docker_names() in docker.py uses underscores instead if hyphens:

if names: names = [s.decode('ascii').replace('\n', '') for s in names] mysql = [k for k in names if '_mysql_' in k][0] wikibase = [k for k in names if '_wikibase_' in k][0]

adjusting the code to if names: names = [s.decode('ascii').replace('\n', '') for s in names] mysql = [k for k in names if '-mysql-' in k][0] wikibase = [k for k in names if '-wikibase-' in k][0]

solved the issue.

It might be useful adjust the command from this issue as well: #4

Best, Michael

shigapov commented 2 years ago

Hi Michael, thank you for reporting this. I did test it with hyphens in Debian, it worked. Are you running it on Windows?

MHuberFaust commented 2 years ago

I run it on Mac.

MHuberFaust commented 2 years ago

So this is weird: I cleared the data from my wikibase instance (as mentioned in youre Readme) and the container names went back to "normal" (names with underscores). Do you have any ideas?

Screenshot 2021-11-11 at 07 45 38

I can work around that, no big deal, just seems strange :)

shigapov commented 2 years ago

Yeah, that's strange. No idea what's that. Since now it works as expected, I am closing the issue. Please reopen if it will repeat.

MHuberFaust commented 2 years ago

It happened again after a docker desktop update. Switching back to docker compose v1 did it for me.

here is a good explanation. Since the latest versions of docker compose moved away from underscores it might be useful to adjust the code to fit both versions.

shigapov commented 2 years ago

I see, thank you! I'll fix it now.