Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting Syntax Error : Invalid Syntax with python 3.10.10 #517

Closed
dineshu07 opened this issue Feb 22, 2024 · 2 comments
Closed

getting Syntax Error : Invalid Syntax with python 3.10.10 #517

dineshu07 opened this issue Feb 22, 2024 · 2 comments

Comments

@dineshu07
Copy link

dineshu07 commented Feb 22, 2024

Hi

I'm trying to use pywinauto, following error comes right after the import statement. Please help me to resolve this. This is happening only on windows 10 machine.

Screenshot from 2024-02-22 17-59-15

@junkmd
Copy link
Collaborator

junkmd commented Feb 22, 2024

Hi,

This is likely due to a Python crash occurring during the comtypes process of writing code to the .py files in .../comtypes/gen/... (See also #114).

I suggest running py -m comtypes.clear_cache (See also #478 and CONTRIBUTING.md). This command will delete those partial wrapper files.
Afterward, please call pywinauto again; it will regenerate the .py files.

Please let us know the results after trying the above steps.

@dineshu07
Copy link
Author

Hi @junkmd It worked!. Thank you so much for your quick solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants