Comments (10)
I have tested it at home in a Debian VM, I had to disable cursor integration (Virtualbox) and install a few libraries but the results are the same as what I had in Windows (but I have not tested "elastic" and "back up" tweens).
The simplest test case is:
import pyautogui
from pyautogui import tweens
pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.tweens.easeInOutQuad)
This doesn't work as is (no move at all).
from pyautogui.
The update to the documentation in 166b828 corrects this. The tweens
module no longer exists, instead you just specify the function directly: pyautogui.easeInOutQuad
instead of pyautogui.tweens.easeInOutQuad
.
from pyautogui.
I am also getting this issue, and it's 2016 now.
Traceback (most recent call last):
File "c:\Users\Adam\Projects\Test\test.py", line 8, in
pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.tweens.easeInOutQuad)
AttributeError: module 'pyautogui' has no attribute 'tweens'
Edit, looks like I had to import pyautogui.tweens
like so:
import pyautogui
import pyautogui.tweens
# use tweening/easing function to move mouse over 2 seconds.
pyautogui.moveTo(500, 500, 2, pyautogui.tweens.easeInOutQuad)
from pyautogui.
Thanks, I'll take a look at it today.
from pyautogui.
Ah, I think I know what the problem is. Is PyAutoGUI updated to the latest version? 0.9.20
In a previous version, PyAutoGUI was set up so that it only expected ranges between 0.0 and 1.0 from the tweening functions. However, the "elastic" and "back up" tweens overshoot the target (for cosmetic effect), and so I rewrote the PyAutoGUI code.
Reopen if this bug is present in 0.9.20. Also, what tween were you using?
from pyautogui.
Yes, the issue was with 0.9.20 installed with pip, sorry I forgot to add this information in the issue.
It was not even working with linear tween...
from pyautogui.
Do you have some code snippets that can reproduce the problem? What exactly is happening? Is the mouse not moving at all? Or is it moving instantly?
from pyautogui.
I'm having a similar issue on Ubuntu, pyautogui.moveTo(500, 500, duration=1, tween=pyautogui.easeInOutQuad)
just makes the pointer sit there and jump to the target after a second, without any tweening or animation at all. I'm running in a virtualenv.
from pyautogui.
I use Ubuntu also, and I get an error when I try it (whether it's python2 or 3).
pyautogui.moveTo(100, 100, 2, pyautogui.tweens.easeInQuad)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'tweens'
from pyautogui.
@asweigart Why is this still not fixed in the readme? 🤔
from pyautogui.
Related Issues (20)
- PyAutoGUI unable to import pyscreeze due to Pillow compatibility issue.
- bug: pyautogui.moveTo method does not work when desktop has no application opened (windows)
- Method Click move cursor. HOT 2
- locateOnScreen flickery on Ubuntu HOT 1
- Bot Facebook
- Omissions in Quickstart Screenshot & Locate
- Questions about Copilot + Open Source Software Hierarchy HOT 1
- pyautogui should propagate the ImageNotFoundException message upward
- Image File Not Found Exception... HOT 4
- trying to use it in the text editor HOT 2
- pyautogui.moveTo() HOT 1
- Is this possible to use locateOnScreen against captured image file instead of screen image? HOT 1
- pyautogui.typewrite replaces '<' with '>' HOT 3
- N/A HOT 1
- pyautogui fails to recognize special characters such as "á, é, í, ó and ú"
- How to check if .typewrite() failed or read the text you tried to insert?
- failed
- screenshot "region" type verification
- Enter key not being recognized by web page
- `locateAllOnScreen` raises `pyscreeze.ImageNotFoundException` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyautogui.