Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"cannot import name 'EVENT_TYPE_OPENED' from 'watchdog.events' "

I'm trying to make a REST api (begginer) but when i tried to initialize the server from this code:

from flask import Flask

app = Flask(__name__)

if __name__=='__main__':
    app.run(debug=True, port=4000)

i get this error in the prompt:

 from watchdog.events import EVENT_TYPE_OPENED
ImportError: cannot import name 'EVENT_TYPE_OPENED' from 'watchdog.events' 
(C:\ ********* \Python\Python310\lib\site-packages\watchdog\events.py)

I'm expecting something like this (Min 8:27): https://www.youtube.com/watch?v=GMppyAPbLYk&ab_channel=TechWithTim

like image 520
brian valladares Avatar asked Nov 19 '25 21:11

brian valladares


1 Answers

Try to do the following:

pip install --upgrade watchdog
like image 139
Gbuntu Avatar answered Nov 22 '25 10:11

Gbuntu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!