facerec_from_webcam_multiprocessing.py run Global is not defined
See original GitHub issue- face_recognition version: 1.23
- Python version: 3.6.6
- Operating System: windows 10
Description
What I Did
facerec_from_webcam_multiprocessing.py run Global is not defined. pls fix it, thanks
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: global is not defined #10035
Bug report I have an Electron based application. we do webpack in the render process. It throws error when I run the app...
Read more >Jest: ReferenceError: global is not defined
this error removed the global issues, but gave me a new one in cannot use import statement outside a module off jest runtime....
Read more >How to fix the ReferenceError: global is not defined error in ...
I spent hours trying to figure this out and it was really difficult to find the exact information on the web since this...
Read more >Uncaught ReferenceError: global is not defined - YouTube
Uncaught ReferenceError: global is not defined at node_modules/@walletconnect/socket-transport/dist/esm/index.jscreate a n ew filw named ...
Read more >index.js:43 uncaught referenceerror: global is not defined
js'; // Run `npm install --save classlist.js`. /** IE10 and IE11 requires the following for the Reflect API. */ // import 'core-js/es6/reflect'; /**...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sujoyu Thank you. Now I realized what’s wrong. Global is a global variable, but I don’t know why on some machines (maybe python version?) it works, but others will show
name 'Global' is not defined
.@Muplex Pass the variable using function arg or just add
global Global
on the start of the functions (capture()
andprocess()
) may work. I will fix this soon.Hi Muplex. The fixed example is following link. https://gist.github.com/sujoyu/ad36b2fef0f0e215d6ee1d093d925e63 I’m not a Python expert too. It may not be a best way.
Additionally, in my low spec but 2 cores 4threads machine, following code is faster than the original.
Change line 125
to
- 1
indicates count of capturing process.