Any advice about always raise : yourls.YourlsOperationError #3043
revenger98
started this conversation in
General
Replies: 1 comment 1 reply
-
We're not the authors of whatever Python library you're using. Try the library's discussions or issue tracker. If you're using https://github.com/tflink/python-yourls (searched up based on your code snippets), maybe try switching to a newer library. That one hasn't seen any commits in something like 10 years. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a simple python script using same data I've used to get more thousand yourls url shorts days before, but now it always trigger this error :
----------CODE----------
import yourls.client
shurl = yourls.client.YourlsClient('http://ser.com/short/yourls-api.php',username='zzz',password='xxx')
xurl = "https://ser.com/short/11q"
url = shurl.expand(xurl)
print url
------ERROR-----------
Traceback (most recent call last):
File "acortar.py", line 12, in
url = shurl.expand(xurl)
File "/usr/local/lib/python2.7/dist-packages/yourls/client.py", line 151, in expand
raw_data = self._base_request(args, shorturl)
File "/usr/local/lib/python2.7/dist-packages/yourls/client.py", line 99, in _base_request
raise YourlsOperationError(url, str(error))
yourls.YourlsOperationError: "Error with url 'https://serxxx.com/short/11q' - HTTP Error 406: Not Acceptable"
Same code used for thousand short-urls now trigger that error
Any advice?
Greetings from PERU
FER
Beta Was this translation helpful? Give feedback.
All reactions