Do [driver.swipe] will get 'An error occurred while executing user supplied JavaScript' error

I’m using python, when I’m trying to do a swipe:
self.driver.swipe(start_x=200, start_y=380, end_x=200, end_y=120, duration=3)

I will get error:
self.driver.swipe(start_x=200, start_y=380, end_x=200, end_y=120, duration=3)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/appium/webdriver/webdriver.py”, line 245, in swipe
action.perform()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/appium/webdriver/common/touch_action.py”, line 94, in perform
self._driver.execute(Command.TOUCH_ACTION, params)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py”, line 173, in execute
self.error_handler.check_response(response)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/appium/webdriver/errorhandler.py”, line 29, in check_response
raise wde
WebDriverException: Message: An error occurred while executing user supplied JavaScript.


Is there any suggestion about how to do swipe here? what I need is: click on somewhere, and move the scroll window up to load more contents. Thanks!

I too am having trouble with swipe. Curious to see what you get if you leave the duration off. For me, it cleared the errors, but, the actual swipe action does not happen.

I have the same problem? Do you have any issues?I can’t find an answer.

just simple use
self.driver.swipe (200,380,200,120,3000)
It will work for sure.