Skip to content

Python: AttributeError: Tolk #23

@chigkim

Description

@chigkim

I'm having a problem running the python example.
It seems I'm missing something very basic, but I'd appreciate if someone could help.

I copied src\python\Tolk.py to examples\python.
Then I copied the following dlls to examples\python.
dolapi32.dll
nvdaControllerClient32.dll
nvdaControllerClient64.dll
SAAPI32.dll
SAAPI64.dll

I ran build.bat, and got no output no error.
When I run python ConsoleApp.py, I get the error below.

Traceback (most recent call last):
  File "C:\Users\chigo\AppData\Local\Programs\Python\Python312\Lib\ctypes\__init__.py", line 450, in __getattr__
    dll = self._dlltype(name)
          ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\chigo\AppData\Local\Programs\Python\Python312\Lib\ctypes\__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'Tolk' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\code\tolk\examples\python\ConsoleApp.py", line 16, in <module>
    import Tolk
  File "D:\code\tolk\examples\python\Tolk.py", line 11, in <module>
    _tolk = cdll.Tolk
            ^^^^^^^^^
  File "C:\Users\chigo\AppData\Local\Programs\Python\Python312\Lib\ctypes\__init__.py", line 452, in __getattr__
    raise AttributeError(name)
AttributeError: Tolk

Thanks so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions