Cognitive-Face-Python
Cognitive-Face-Python copied to clipboard
SyntaxError: Invalid Syntax On Windows 10 Py3
Following the regular instructions in the read me on Win10 using Py3, it fails running "python sample" or "python3 sample"
$ python sample
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\runpy. py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\runpy. py", line 85, in _run_code
exec(code, run_globals)
File "sample\__main__.py", line 8, in
from view import MyApp
File "sample\view\__init__.py", line 15, in
from view.panel_detection import DetectionPanel
File "sample\view\panel_detection.py", line 90
@util.async
SyntaxError: invalid syntax
Hi @secbug , can you have a try with python x64?
I actually did two things to fix this and start the app.
- Included the change in pull request #60 -
178 - def async(func):
178 +async def func()::
- Removed the offending line in panel_detection.py:
90 - @util.async
Are there negative side-effects to this, as I've seen none thus far in the UI.
Right, Both of these are used to define the function as async. "@util.async" is just an easier way of saying async_detect = util.async(async_detect).