Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while importing from telegram #34

Open
lagemeet opened this issue Jun 21, 2021 · 7 comments
Open

error while importing from telegram #34

lagemeet opened this issue Jun 21, 2021 · 7 comments

Comments

@lagemeet
Copy link

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
Copy link

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

@tatsumoto-ren
Copy link

Any updates on this issue? It still persists.

@tulir
Copy link
Member

tulir commented Jul 28, 2021

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

@bendschs
Copy link

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

@tatsumoto-ren
Copy link

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
Copy link

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

@mohsenasm
Copy link

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

lxndrbnsv added a commit to lxndrbnsv/stickerpicker that referenced this issue May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants