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

Aylo API: add script dir resolving helper #1662

Closed
wants to merge 1 commit into from

Conversation

nrg101
Copy link
Contributor

@nrg101 nrg101 commented Feb 21, 2024

problem

The py_common folder up one level was not being resolved, resulting in errors logged, e.g.

2024-02-21 14:53:48
Error   
scrapeSceneURL: input: scrapeSceneURL could not unmarshal json from script output: EOF
2024-02-21 14:53:48
Error   
could not unmarshal json from script output: EOF
2024-02-21 14:53:48
Error   
[Scrape / TransAngels] ModuleNotFoundError: No module named 'py_common'
2024-02-21 14:53:48
Error   
[Scrape / TransAngels]     import py_common.log as log
2024-02-21 14:53:48
Error   
[Scrape / TransAngels]   File "/root/.stash/scrapers/TransAngels/../AyloAPI/scrape.py", line 10, in <module>
2024-02-21 14:53:48
Error   
[Scrape / TransAngels] Traceback (most recent call last):

solution

This just adds the current script directory to the sys.path to allow py_common to be found.

@Maista6969
Copy link
Collaborator

We removed this from most of the Python scrapers as it should not be necessary after stashapp/stash#4372 was merged

Did you install the scraper manually? Is there anything nonstandard about your setup?

@nrg101
Copy link
Contributor Author

nrg101 commented Feb 22, 2024

Hmm, yes, sorry... I was on an old stash version that predated the plugin management feature and had manually installed all the scrapers.

After reinstalling all the scrapers, TransAngels.com scenes scrape successfully.

@nrg101 nrg101 closed this Feb 22, 2024
@nrg101 nrg101 deleted the fix-aylo-py_common-imports branch February 22, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants