Jumbled and random characters being outputted to console

Problem description:

I am making a request to an api and when I print what is being returned, it shows a bunch of jumbled random characters

Expected behavior:

I want to print to the correct json that is supposed to be returned. When I run this with a different IDE like visual studio code or pycharm it works fine.

Actual behavior:

Prints random unreadable characters that after sometimes turn into the actual response or just stay on the screen

Bug appears at this link:



Windows 11 PC

That link isn’t to your Repl, could you please provide a link to it?

1 Like

hello, sorry but the code is private. i can give you an example api request snippet

response = session.post(

          p = response.text

this would return something like

@�^�NkޟC�-I����d[Բ UE�6< �i�’uX6�����

by the way it sometimes prints the correct json output but the entire console is just glitched

Still need help, i have tried different replits with the same result

Could you see if you see the same glitches on https://xtermjs.org/?

That looks suspiciously like data compressed with gzip, what headers are you sending to the server?

1 Like

thank you, headers was the problem


A post was split to a new topic: Jumbled and random characters being outputted to console - spam

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.