1

I'm running a python repl.it environment / project, my code is as stated below:

from webbot import Browser
import time
from keyboard import press
import mouse


web = Browser()

tab = 1
add = 1

web.go_to('https://tankster.io')
time.sleep(7.5)

mouse.move(585, 335, absolute=True, duration=0.5)
mouse.click('left')

text_areas = web.find_elements(xpath='//input')
web.type(web.Key.ENTER,into=text_areas[0].text)

time.sleep(3)

global h
h = 100

while(h > 99):
  press('enter')
  time.sleep(5)

Start-up starts out normal:

Repl.it: Updating package configuration

--> python3 -m poetry add mouse

Using version ^0.7.1 for mouse

Then produces the following error:

[RecursionError]
maximum recursion depth exceeded
exit status 1


Repl.it: Package operation failed.

I've never gotten any errors like this before, any help would be greatly appreciated!

Frostwolfu
  • 15
  • 5

1 Answers1

0

The mouse module requires root access in linux, which is not available to the runner (i.e., the repl.it user). See "known limitations" at the end of the mouse PyPI description or the mouse repo:

  • To avoid depending on X the Linux parts reads raw device files (/dev/input/input*) but this requries root.

To automate web UI interaction, I recommend trying Selenium web drivers with python instead of webbot and mouse modules. Here are documentations about how to use.

Mavaddat Javid
  • 491
  • 4
  • 19
  • Selenium is hard to configure in repl.it... I've succeeded once (a really long time ago) but it no longer works. Any suggestions on that front? – 12944qwerty May 03 '21 at 17:23