Forums

Facebook Query set error

Hey I am using selenium from django app in pythonanywhere. I am using selenium to create post in facebook. Earlier it worked correctly but when debugging the process with screenshots, I am seeing a new error : enter image description here

I googled it and it shows you have to delete browsing data from chrome://settings/clearBrowserData. It will look something like this: enter image description here

I need to open this window and press the clear data button in order for my selenium to work on facebook. I made a code to clear the browsing data and used it in my local server for testing and it worked. But when I use the same code in pythonanywhere, it doesn't work. By debugging it from screenshots, I don't see anything similar to the above photo but rather I just see white image. Why cant selenium doesn't open settings from chrome in pythonanywhere??

Every time that you start a browser using selenium, it starts with the browser not having any browsing data, so starting a browser effectively starts already having done that. If your really want to, you can clear the browser data using the code in the first answer in this SO question

Have you ever encountered this error? Because The same script works perfectly when run from the local server. It also worked perfectly from this platform (PythonAnywhere) but a few days ago this error popped. But this doesn't affect the local server, the script works with the same code and same login account.

No, we have not encountered that. Are your local chrome and selenium the same versions as the ones on PythonAnywhere?

No,

==================

LOCAL

chrome : 97.0.4692.99

selenium : 4.1.0

===================

PYTHON ANYWHERE

chrome : 78.0.3904.70

selenium : 3.141.0

===================

But as I told, earlier in python anywhere with the same version as I stated above, it worked just fine. I am getting this error when making changes in post descriptions in marketplace groups (while selling).

relevant link this is the blog that helps to solve the error but I am not sure how to do it with selenium in pythonanywhere platform

Is there a way to update selenium or chromedriver? because I think the pythonanywhere supports selenium 3.141.0 from the docs but I don't know about chromedriver

@eyal360 Looks like you need to upgrade your system image first. Take a look at https://help.pythonanywhere.com/pages/ChangingSystemImage/

Will changing system image solve my issue? or I need to upgrade selenium or chromedriver?

Well I changed system image to latest version, upgraded selenium which is 4.1.0 and chromdriver is 90.... but it didn't solve my problem.

I am still getting query error

Can you find any other differences between what you do on your local machine and on your PythonAnywhere account?

I found the error. This has nothing to do with the PythonAnywhere and the local machine. This is specifically facebook's server error. Even in the local browser, when I tried with the same FB account, the same error popped up. I tried with a different account and it works, both in local and PythonAnywhere.

Also thanks for pointing out my system image. I thought it was the latest.

Glad to hear that you found it!