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

Python Interactive not Printing Correctly #3717

Closed
realimpat opened this issue Dec 29, 2018 · 3 comments
Closed

Python Interactive not Printing Correctly #3717

realimpat opened this issue Dec 29, 2018 · 3 comments
Assignees

Comments

@realimpat
Copy link

Environment data

  • VS Code version: 1.30.1
  • Extension version (available under the Extensions sidebar): 2018.12.1
  • OS and version: MacOS Sierra
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3.6.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): XXX
  • Relevant/affected Python packages and their versions: requests=2.21, IPython 7.2.0, ipykernel=5.1.0, jupyter

Expected behaviour

I should be able to print a requests object.

Actual behaviour

Nothing shows up!

I attached a screenshot. My terminal at the bottom printed correctly, as a result of clicking to run the selection in Python Terminal.

Steps to reproduce:

  1. make a request
  2. Print it

Logs

none

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

none

screen shot 2018-12-29 at 12 29 54 am

@rchiodo
Copy link
Contributor

rchiodo commented Jan 2, 2019

I believe the problem is we're treating the returned data as html directly instead of wrapping it in a span. So the <Response [200]> is treated like an html tag.

@realimpat
Copy link
Author

@rchiodo that makes sense to me. are you able to change the behavior to wrap output in span, and see if that resolves the issue?

Seems relevant to printing objects generally, not just requests objects. E.g. printing a package is wrapped in tags... <module 'package' from 'path/here.py'>

Seems like a straightforwards fix to make for the next release?

@rchiodo
Copy link
Contributor

rchiodo commented Jan 2, 2019

Unfortunately it's not as simple as just sticking a span around everything. It all depends upon the type of stream data. We have to put spans just around text data. It should be fixed soon though.

@greazer greazer assigned greazer and rchiodo and unassigned greazer Jan 3, 2019
@rchiodo rchiodo closed this as completed Apr 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 22, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants