R
R
Rostislav Ivanov2021-09-15 05:42:03
Python
Rostislav Ivanov, 2021-09-15 05:42:03

How to fix PyAutoGUI import error?

Good afternoon.
Unable to import PyAutoGUI module into program.
Reinstalled PyAutoGUI several times, restarted the computer, nothing comes out.
(I'm powerless. I tried to find a solution on the Internet, but failed.)
(I use Komodo because I like the interface)

Help, I don't understand what the problem is and how to solve it.

Also, after a trial run of the program in Komodo, a separate string file is created.
Shown on screen.

Traceback (most recent call last):
  File "C:\python\Script\Coord.py", line 1, in <module>
    import pyautogui
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pyautogui\__init__.py", line 22, in <module>
    import platform
  File "c:\users\user\appdata\local\programs\python\python39\lib\platform.py", line 779, in <module>
    collections.namedtuple(
  File "c:\users\user\appdata\local\programs\python\python39\lib\collections\__init__.py", line 431, in namedtuple
    __new__ = eval(code, namespace)
  File "<string>", line 0, in <module>
TypeError: 'NoneType' object does not support item assignment
Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python39\lib\base64.py", line 510, in _input_type_check
    m = memoryview(s)
TypeError: memoryview: a bytes-like object is required, not 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\bin\py3_dbgp.py", line 307, in <module>
    sys.exit( main(sys.argv) )
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\bin\py3_dbgp.py", line 303, in main
    client.runMain(args, interactive)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\python3lib\dbgp\client.py", line 2482, in runMain
    self.cmdloop()
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\python3lib\dbgp\client.py", line 2552, in cmdloop
    self.onecmd(data)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\python3lib\dbgp\client.py", line 2652, in onecmd
    return func(argv[1:])
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\python3lib\dbgp\client.py", line 3511, in do_source
    source = base64_encodestring(source)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 12\lib\support\dbgp\python3lib\dbgp\client.py", line 1358, in base64_encodestring
    return base64.encodebytes(data).decode()
  File "c:\users\user\appdata\local\programs\python\python39\lib\base64.py", line 527, in encodebytes
    _input_type_check(s)
  File "c:\users\user\appdata\local\programs\python\python39\lib\base64.py", line 513, in _input_type_check
    raise TypeError(msg) from err
TypeError: expected bytes-like object, not str


61415cf9f13f5066432231.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
o5a, 2021-09-15
@o5a

https://qna.habr.com/q/1019206

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question