filipporomani / whatsapp-python

Open source Python wrapper for the WhatsApp Cloud API.
https://pypi.org/project/whatsapp-python/
MIT License
79 stars 15 forks source link

[BUG] requirements not declared by default #28

Closed SurajBhari closed 4 months ago

SurajBhari commented 4 months ago

Describe the bug just doing pip install whatsapp-python doesn't make it run. and can be misleading for new developers who don't know what is wrong.

To Reproduce Steps to reproduce the behavior:

  1. make a new enviorement.
  2. pip install whatsapp-python
  3. try using it by importing it and get ModuleNotFoundError

Expected behavior it should have installed

Additional context just adding a requirements.txt and stating it in setup.py should work.

filipporomani commented 4 months ago

Fixed - updated pyproject.toml

Thanks for reporting!!

SurajBhari commented 4 months ago

hey @filipporomani i accidentally called it requests_toolkit while it is requests_toolbelt :yikes:

filipporomani commented 4 months ago

😂 no prob I'll fix this up

SurajBhari commented 4 months ago

@filipporomani i had a question i am trying to run the webhook example. but the issue is the data given by the api if passed to Message class in data attribute. will give a broken object. where simple stuff like message.sender is None. is this expected behavour ? cuz i don't think so// while using the example in https://github.com/filipporomani/whatsapp/blob/3c04097af9802594d1ddf479abaaadfb662ece65/whatsapp/ext/_static.py#L5 works fine on same data. what am i doing wrong ??

SurajBhari commented 4 months ago

on doing some debugging i found a mistake in this line https://github.com/filipporomani/whatsapp/blob/3c04097af9802594d1ddf479abaaadfb662ece65/whatsapp/__init__.py#L243

the self.instance = instance should be way above as self.instance is being utilized above. and it will throw an error f'ing up everything and making everything None.

SurajBhari commented 4 months ago

I will make PR to fix it all xD