question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple print command not working

See original GitHub issue

From @roberti on November 8, 2018 9:43

Issue Type: Bug

the code in file foo.py is:

# simple print
print('hell')

The result is: Exception has occurred: AttributeError ‘NoneType’ object has no attribute ‘write’ File “C:\Projetos\Faculdade\POO\python\datas.py”, line 4, in <module> print(‘hell’)

It is working perfectly in python console. Does not work in Visual Studio Code.

VS Code version: Code 1.28.2 (7f3ce96ff4729c91352ae6def877e59c561f4850, 2018-10-17T00:23:51.859Z) OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel® Core™ i5-8250U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 7.86GB (2.44GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
anaconda-extension-pack ms- 1.0.1
python ms- 2018.9.2

Copied from original issue: Microsoft/vscode#62771

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
roberticommented, Nov 9, 2018

Same path as other IDEs… C:\ProgramData\Anaconda3\

But… as you mentioned it now I made some new tests… I don’t know why, but the default executable set is “pythonw.exe” (I really didn’t realized that w there untill now, I’m sorry). Changing to “python.exe” the things work. With “pythonw.exe” the problem occurs. Actually I googled it and found the difference, and seems that the error is actually the normal behaviour for pythonw.exe. Just can’t imagine why that executable was set as default in the instalation process (I’ve installed VS Code through the end of Anaconda instalation). Anyway, thank you for the assistance! And very sorry for not have seen that before (I really had read all the settings.json relevant attributes - python path included, and didn’t see that).

Best regards!

Waldemar

0reactions
roberticommented, Nov 20, 2018

I Agree. Probably this behaviour came from the anaconda installer. It is very time consuming - specially for people that uses python occasionaly. Is there a way to report it to anaconda?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix : Printer not accepting print command - YouTube
If you ever have problem with your printer is not printing , i this tutorial i will show you how you can fix...
Read more >
Printer Not Accepting Print Command in Windows 10 FIX
Printer Not Accepting Print Command in Windows 10 FIX.Are you getting a “printer not responding” error when trying to print a document with ......
Read more >
Fix Printer Not Accepting Print Command - YouTube
How to fix if your printer is not accepting print commands. Commands used in this tutorial: Net Stop Spooler del ...
Read more >
Fix: Printer is not accepting print command in Windows 11 ...
1. At first, press the Windows key+R keys together. · 2. Then paste this command in the Run terminal and hit Enter. control...
Read more >
Fix: Printer Not Receiving Print Command
How to Fix a Printer That's Not Taking Print Commands · Run the Printer Troubleshooter · Restart the Print Spooler Service · Update...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found