maunium / stickerpicker

A fast and simple Matrix sticker picker widget
GNU Affero General Public License v3.0
312 stars 592 forks source link

error while importing from telegram #34

Open lagemeet opened 3 years ago

lagemeet commented 3 years ago

While importing any stickerpack i got this

Reuploading 1179969546484711763..Traceback (most recent call last):
  File "/home/lagemeet/stickerpicker/.venv/lib/python3.7/site-packages/sticker/stickerimport.py", line 85, in reupload_pack
    reuploaded_documents[document.id] = already_uploaded[document.id]
KeyError: 1179969546484711763

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lagemeet/stickerpicker/.venv/bin/sticker-import", line 8, in <module>
    sys.exit(cmd())
  File "/home/lagemeet/stickerpicker/.venv/lib/python3.7/site-packages/sticker/stickerimport.py", line 164, in cmd
    asyncio.get_event_loop().run_until_complete(main(parser.parse_args()))
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/lagemeet/stickerpicker/.venv/lib/python3.7/site-packages/sticker/stickerimport.py", line 156, in main
    await reupload_pack(client, pack, args.output_dir)
  File "/home/lagemeet/stickerpicker/.venv/lib/python3.7/site-packages/sticker/stickerimport.py", line 88, in reupload_pack
    reuploaded_documents[document.id] = await reupload_document(client, document)
  File "/home/lagemeet/stickerpicker/.venv/lib/python3.7/site-packages/sticker/stickerimport.py", line 38, in reupload_document
    mxc = await matrix.upload(data, "image/png", f"{document.id}.png")
  File "/home/lagemeet/stickerpicker/.venv/lib/python3.7/site-packages/sticker/lib/matrix.py", line 89, in upload
    return (await resp.json())["content_uri"]
KeyError: 'content_uri'
zoenglinghou commented 3 years ago

I have the same error. Did telegram change their APIs?

tatsumoto-ren commented 3 years ago

Any updates on this issue? It still persists.

tulir commented 3 years ago

That error means your homeserver's media repo is broken (e.g. the homeserver URL you entered doesn't route media requests correctly)

bendschs commented 3 years ago

same error came up for me, when i did not provide the full URL (including "https://") but just the domain name.

tatsumoto-ren commented 3 years ago

That error means your homeserver's media repo is broken (e.g. the homeserver URL you entered doesn't route media requests correctly)

Thanks. After I switched to another homeserver, the error disappeared.

TheRealKingS commented 2 years ago

I solved this by replacing the auth token in config.json

mohsenasm commented 1 year ago

I had the same issue. Refreshing the auth token (with a sign-out + sign-in) fixed this.