So I have a python script that uses the modules beautifulsoup4 and requests, which I’ve already installed using the terminal.
However, my code’s not returning anything.
My best guess is the python program’s not actually getting a response.
Does anyone know if this kind of thing work here?
I’m calling the python script from a js file using child_parent btw. It works fine. I tested it with a python file that just prints “hello world!” and it worked.
Could you provide a link to the project or the code that you’re using? It’s difficult to troubleshoot in the abstract.
I remixed your project to take a look and upon running your python script in the terminal directly I found that it was raising
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library? which is related to your use of the lxml parser. This is just an additional dependency pip doesn’t pick up automatically, running
pip3 install lxml clears that up.
Beyond that, how is the Python file supposed to be called, because after fixing that error, it seems to me it only gets called once when the container wakes up, its not triggered by HTTP requests directly as far as I can tell…
You’re completely right.
For some reason, I didn’t think of running it directly on the terminal to see what the error was.
As for how it is called, I haven’t implemented that.
Thanks so much for the help.
You’re welcome! I’m excited to see what this project turns into, I’m an avid letterboxd user…
Cool. I’m just playing around with lettterboxd and discord, seeing what I can do.