Python Forum
unexpected token < in json at position 0
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unexpected token < in json at position 0
#1
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys


username = 'xxxxxxxx'
password = 'xxxx'

url = 'https://betfury.io/'

driver = webdriver.Chrome('C:\chromedriver.exe')

driver.get(url)

time.sleep(10)
#log poga
driver.find_element_by_xpath('//*[@id="app"]/div[3]/div/div/nav/div[2]/div/button[1]').click()
time.sleep(10)

# Email input
driver.find_element_by_xpath('/html/body/div[1]/div[3]/div/div/div[1]/form/div[1]/div/input').send_keys(username)
#pass input
#/html/body/div[1]/div[3]/div/div/div[1]/form/div[2]/div/input
driver.find_element_by_xpath('/html/body/div[1]/div[3]/div/div/div[1]/form/div[2]/div/input').send_keys(password)

#press login button
loginbutton = driver.find_element_by_xpath('//*[@id="app"]/div[3]/div/div/div[1]/form/button')
loginbutton.click()
and i get a erorr like this - unexpected token < in json at position 0
i use python 3.9 code run into pycharm, use selenium webdriver - goglechromedriver
please help me out what i do wrong...

i whanted to auto login website...
Reply
#2
Quote:and i get a erorr like this - unexpected token < in json at position 0
please show entire unaltered error message (traceback) in error tags.
There's a lot of useful information that helps discover the cause of the errors.
Reply
#3
(Jul-05-2021, 02:13 AM)Larz60+ Wrote:
Quote:and i get a erorr like this - unexpected token < in json at position 0
please show entire unaltered error message (traceback) in error tags.
There's a lot of useful information that helps discover the cause of the errors.

this is only what i get...

Attached Files

Thumbnail(s)
   
Reply
#4
This looks like a website error, and not coming from your code.
Reply
#5
(Jul-09-2021, 11:11 PM)Larz60+ Wrote: This looks like a website error, and not coming from your code.
How can i goo around it? If i go from gogle chrome web brouser i can log in, when i go trought webdrive i cant login. Theare are poseoble go araund somehow, and get in the web site? If i use webbrouser in code instead webdrive, i cant use findelementbyxpath and ext comonds ... So i thinking if theare some posoble to get in... Maybe some one can help get in, i can pay a some litle $ for helping out me...
Reply
#6
I'm not sure you can go around it.
Bring thr debugger up, and step through the program until the error pops up.
When i tried the site, a pop-up came up informing me that I was unable to use the app.
That may be what's causing the error.
At any rate, it's not python of selenium that's causing issuing the error.
stepping through with debugger will isolate the statement that starts the error condition.
If you don't know hoe to use the debugger, see your ide's documentation, or use print statements
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Refresh token for Wyze SDK duckredbeard 0 1,119 May-16-2022, 04:33 AM
Last Post: duckredbeard
  Need to sign JWT token with JWK key stucoder 1 1,695 Feb-21-2022, 09:04 AM
Last Post: stucoder
  Python requests oauth2 access token herobpv 6 3,941 Sep-27-2021, 06:54 PM
Last Post: herobpv
  / token in function parameterlist tpourjalali 1 1,881 Apr-12-2020, 07:05 PM
Last Post: deanhystad
  Getting an "Unexpected Token" Error and don't know why... NotAHackusator 1 1,855 Nov-20-2019, 03:00 PM
Last Post: buran
  get and reuse the token value with huawei modem Reims 1 4,591 Oct-02-2019, 04:29 AM
Last Post: Reims
  Need help in adding xsrf token keerthiprashanth 1 2,049 Aug-08-2019, 02:35 PM
Last Post: keerthiprashanth
  Python - joining xmls together invalid token error jan86 0 2,220 Apr-26-2019, 08:52 AM
Last Post: jan86
  syntax error near unexpected token btom529 5 7,711 Apr-21-2019, 09:03 PM
Last Post: btom529
  tweepy:invalid or expired token weareux 2 6,471 Dec-03-2017, 07:27 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020