Open Chilipp opened 4 years ago
@Chilipp in your error message I only see python3. The container entrypoint may not be python3, but the error trace is using it (3.6).
The openbases module is installed with pip3, see https://github.com/rseng/pdf-generator/blob/master/Dockerfile#L29.
@Chilipp in your error message I only see python3
True, sorry :sweat_smile:
It's strange, because this seems to be an issue with the docker container.
When I run
docker run -it --entrypoint python3 -v `pwd`:/github/workspace rseng/pdf-generator -c "open('_events/talks/event-ID_UNKNOWN.md').read()"
I am getting the above-mentioned error. Can you reproduce this @vsoch?
When I use my local python3.6 installation instead (i.e. outside of the docker container), python3 -c "open('_events/talks/event-ID_UNKNOWN.md').read()"
I don't get any problems at all. Don't know, what the issue is here. One possibility (but this would mean to adapt the read_file function, would be to specify an encoding. In other words. This here seems to work:
docker run -it --entrypoint python3 -v `pwd`:/github/workspace rseng/pdf-generator -c "open('_events/talks/event-ID_UNKNOWN.md', encoding='utf-8').read()"
found a fix! we just need to install the locales in the docker container, i.e. add something like
RUN apt install locales && locale-gen en_US en_US.UTF-8 && dpkg-reconfigure locales
to the Dockerfile. Then it works
Ah let's give that a shot!
okay here is a branch to try! https://github.com/rseng/pdf-generator/pull/7. If that works, I'll merge and draft a release.
as mentioned in https://github.com/SORSE/sorse.github.io/pull/320, the pdf-generator apparently uses python 2.7 for the
ob-paper
command. You can reproduce the error with the following steps:@vsoch: the issue is in the
ob-paper
command. Try the followingwhen I run these commands, I am getting the error below, caused by the
’
signs that I replaced in https://github.com/SORSE/sorse.github.io/pull/320/commits/53a6dd75763a5ed9de9a785eaa266be2dc837773Error message
``` Traceback (most recent call last): File "/usr/local/bin/ob-paper", line 11, inrunning
docker run -it --entrypoint python -v
pwd:/github/workspace rseng/pdf-generator --version
givesPython 2.7.17