Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importbot won't start on ol-home0 #9277

Closed
scottbarnes opened this issue May 15, 2024 · 3 comments · Fixed by #9278
Closed

importbot won't start on ol-home0 #9277

scottbarnes opened this issue May 15, 2024 · 3 comments · Fixed by #9278
Assignees
Labels
Lead: @scottbarnes Issues overseen by Scott (Community Imports) Module: Import Issues related to the configuration or use of importbot and other bulk import systems. [managed] Priority: 0 Fix now: Issue prevents users from using the site or active data corruption. [managed] Type: Bug Something isn't working. [managed]

Comments

@scottbarnes
Copy link
Collaborator

Problem

ol-home0:~$ docker logs --tail=10 -f openlibrary-importbot-1
Python 3.12.2
Traceback (most recent call last):
  File "/openlibrary/scripts/manage-imports.py", line 12, in <module>
    from openlibrary.api import OLError, OpenLibrary
ModuleNotFoundError: No module named 'openlibrary'
Python 3.12.2
Traceback (most recent call last):
  File "/openlibrary/scripts/manage-imports.py", line 12, in <module>
    from openlibrary.api import OLError, OpenLibrary
ModuleNotFoundError: No module named 'openlibrary'

This may be due to changes to _init_path().

Reproducing the bug

No response

Context

No response

Notes from this Issue's Lead

Stakeholders

@mekarpeles, @cdrini

@scottbarnes scottbarnes added Type: Bug Something isn't working. [managed] Module: Import Issues related to the configuration or use of importbot and other bulk import systems. [managed] Priority: 0 Fix now: Issue prevents users from using the site or active data corruption. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] labels May 15, 2024
@mekarpeles
Copy link
Member

Normally, what happens is openlibrary-importbot-1 runs https://github.com/internetarchive/openlibrary/blob/master/docker/ol-importbot-start.sh which executes the command:

scripts/manage-imports.py --config "$OL_CONFIG" import-all

Since this is breaking, the container is unreachable for testing, so instead we can use a similar container to try this command:

ssh ol-home0
docker exec -it -uopenlibrary openlibrary-cron-jobs-1 bash
scripts/manage-imports.py --config "$OL_CONFIG" import-all

Which should give us an error, and we suspect you can fix it by adding PYTHONPATH=.

@mekarpeles
Copy link
Member

The solution is indeed prepending PYTHONPATH=.

@mekarpeles
Copy link
Member

We updated the ol-importbot-start.sh and then used docker cp:

docker cp docker/ol-importbot-start.sh openlibrary-importbot-1:/openlibrary/docker/ol-importbot-start.sh

mekarpeles added a commit that referenced this issue May 15, 2024
@mekarpeles mekarpeles added Lead: @scottbarnes Issues overseen by Scott (Community Imports) and removed Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] labels May 15, 2024
@mekarpeles mekarpeles self-assigned this May 15, 2024
scottbarnes pushed a commit that referenced this issue May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @scottbarnes Issues overseen by Scott (Community Imports) Module: Import Issues related to the configuration or use of importbot and other bulk import systems. [managed] Priority: 0 Fix now: Issue prevents users from using the site or active data corruption. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants