Issue with replit's python interpreter's console behavior - not seeing the correct output in the console

Problem description

The below code doesn’t print anything in the console :
Note: Not a browser issue, checked with Chrome and Edge
code:

print("this is the first print")

a = ""
print(a)

Expected behavior

this is the first output

Actual behavior

nothing seen in the console - empty

Steps to reproduce

Run the below code:
code:

print("this is the first print")

a = ""
print(a)

Browser

Chrome, Edge

OS

Windows, Linux

Device if mobile

N/A

Plan

free tier

Please upload screenshots

I published this bug for easier debug:
https://replit.com/@tarun835081/pytestpy?v=1

Hi! Try zooming in/out?

1 Like

The second print(a), puts a newline in the console and the console UI of replit fails to show the first line :slightly_smiling_face:

Although, when trying to select the contents in the console, I can see the first print in a line above.

If there is more than one print statement before print(a), the console UI of replit seems to show all the prints in the console.

https://replit.com/@tarun835081/pytest1py?v=1

Ok, seems like visually the console doesn’t adaptively adjust the visual width when having multiple newlines. Not a functional bug, but visually misleading.

This is most likely part of the larger issue with browser zoom. Could you try adjusting your zoom as @QwertyQwerty88 suggested?

I’m not sure if this is part of the Zoom issue. Let me look into it. Thanks for the Repl example @tarun835081.

We’re looking into this one, it does look like a bug. I’ll update here as soon as I have more information on a potential solution.
For the other issue (the browser zoom causing it to look like there are no Run results in the console), we should have a PR/fix out for that soon.

2 Likes

Yeah, it ended up being a strange edge case. Try it now @tarun835081?

As an aside, the zoom is also fixed. So let me know if you guys see any other bugs with console not showing prints.

3 Likes

Perfect. Now the issue is solved. Thanks @SuzyAtReplit and community.

1 Like

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