Forums

Always on task throw an error, but in bash my code works great

Hey! I wrote a parser which works with selenium and bs4 and when i run it from bash it works without errors. But when i run an always on task my program doesn't start and throw an error: "can't start a session" Can you help me in solving this problem?

Sorry for inconvenience -- we had some issues with our task servers, it should be fixed now. Are you still getting this error?

I've changed my code a little and it wokrs more stable from the bash. But i can't check always on task now becouse i've used all cpu seconds. As you wrote at help page on your website i can't run it now.

Also i found help page for selenium and you say, that i need run that in bash:

pip3.7 install --user --upgrade selenium

i haven't done that, can it cause my problems?

It depends on what your issues are, and what you are trying to do, but if you're trying to use Selenium with headless Chrome, old version of Selenium would probably cause errors. Also -- mind that python3.7 is used as an example, the version of Python should match the version you're using to run your script.

i'm trying to load page where some elements are loaded by JS. I'm using Selenium to load page markup and then looking for elements using Beautiful soup 4. After parsing i'm sending results to telegram bot private messages

I'm using headless chrome, that means when i install upgrade my problem can be solved?

Selenium upgrade solves most of the problems like that.