3mora2 / WPP_Whatsapp

WPP_Whatsapp aim of exporting functions from WhatsApp Web to the python, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
MIT License
75 stars 12 forks source link

Wrong import of playwright #24

Closed madina-kamet closed 9 months ago

madina-kamet commented 9 months ago

I have faced this issue during running your project, I will try to downgrade version and will tell you if it will help

Below is error

Traceback (most recent call last): File "/Users/galix/Projects/shopster-cashback/backend/main/manage.py", line 22, in <module> main() File "/Users/galix/Projects/shopster-cashback/backend/main/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 275, in fetch_command klass = load_command_class(app_name, subcommand) File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 48, in load_command_class module = import_module("%s.management.commands.%s" % (app_name, name)) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/Users/galix/Projects/shopster-cashback/backend/main/bots/management/commands/bot.py", line 3, in <module> from WPP_Whatsapp import Create File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/WPP_Whatsapp/__init__.py", line 1, in <module> from WPP_Whatsapp.api.Whatsapp import Whatsapp File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/WPP_Whatsapp/api/Whatsapp.py", line 4, in <module> from WPP_Whatsapp.api.layers.HostLayer import HostLayer File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/WPP_Whatsapp/api/layers/HostLayer.py", line 12, in <module> from WPP_Whatsapp.PlaywrightSafeThread import ThreadsafeBrowser File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/WPP_Whatsapp/PlaywrightSafeThread/__init__.py", line 1, in <module> from WPP_Whatsapp.PlaywrightSafeThread.browser.threadsafe_browser import ThreadsafeBrowser File "/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/WPP_Whatsapp/PlaywrightSafeThread/browser/threadsafe_browser.py", line 11, in <module> from playwright._impl import _api_types ImportError: cannot import name '_api_types' from 'playwright._impl' (/Users/galix/Projects/shopster-cashback/backend/main/venv/lib/python3.9/site-packages/playwright/_impl/__init__.py)

UPDATE: Downgrading to 1.38.0 solves the problem

3mora2 commented 9 months ago

Ok