Code Monkey home page Code Monkey logo

Comments (7)

daman9999 avatar daman9999 commented on August 21, 2024 1

replace stdout.decode() with stdout.decode("cp1252") it will work

from red-python-scripts.

renqiukai avatar renqiukai commented on August 21, 2024

command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode("gb2312")

from red-python-scripts.

Kokojuice2 avatar Kokojuice2 commented on August 21, 2024

Did what you suggested, received this error.

image

What can we do to fix this?
Thanks in advance!

from red-python-scripts.

saurabhkingp avatar saurabhkingp commented on August 21, 2024

image

I am getting the same error.
Plzz tell us how to resolve this

from red-python-scripts.

dawidvanstraaten avatar dawidvanstraaten commented on August 21, 2024

image

I am getting the same error.
Plzz tell us how to resolve this

Try the following change (Add the 'utf-8', 'ignore' arguments to decode methods in the script):

command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode('utf-8', 'ignore')

from red-python-scripts.

saurabhkingp avatar saurabhkingp commented on August 21, 2024

image
I am getting the same error.
Plzz tell us how to resolve this

Try the following change (Add the 'utf-8', 'ignore' arguments to decode methods in the script):

command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode('utf-8', 'ignore')

Not working it says TabError: inconsistent use of tabs and spaces in indentation.
IDK why but I had tried many steps but nothing is working for me.

from red-python-scripts.

davidbombal avatar davidbombal commented on August 21, 2024

Thanks @daman9999

from red-python-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.