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.

_pydev_bundle.pydev_console_utils.DebugConsoleStdIn causes "None has no attribute encoding"

See original GitHub issue

None has no attribute encoding exception happens in VS when debugging a Python Windows Application that checks sys.stdin.encoding. type(sys.stdin) is <class '_pydev_bundle.pydev_console_utils.DebugConsoleStdIn'>.

(The problem occurs in VS 2017 15.8.1. In VS 2017 15.6.2 this still works correctly.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
huguesvcommented, Feb 20, 2020

We had a recent issue with it, so it may have been fixed and then regressed. https://github.com/microsoft/ptvsd/issues/2052

It should be fixed again in 16.5.

1reaction
huguesvcommented, Nov 16, 2018

Thanks! That makes sense.

stdin should probably be None, or have an encoding attribute. Not this in-between thing.

I filed an issue at https://github.com/Microsoft/ptvsd/issues/1023 for ptvsd devs to look at.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve AttributeError: 'NoneType' object has no ...
Your s might be Nonetype. Try s = con.string if s:file.write(s.encode('utf8')) # or if s is not None #if you want to check...
Read more >
AttributeError NoneType object has no attribute encode
The AttributeError NoneType object has no attribute encode error is a common error that occurs when you try to call the encode() method...
Read more >
'NoneType' object has no attribute 'dumps'? I am ...
Something in your code is returning a None rather than a value. (None is a NoneType). Since None doesn't have any attributes or...
Read more >
Python AttributeError — What is it and how do you fix it?
The attribute error in Python means that you tried accessing a ... "object has no attribute " means the object you're using doesn't...
Read more >
AttributeError: 'NoneType' object has no attribute 'setMovie'
I'm new to PsychoPy and I'm using the v2023.1.2 with a combination of builder with snippets of code. I have a routine called...
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