obsei/obsei

[BUG] Not able to use Twitter and Facebook as Data Source

tanish36 opened this issue · 1 comments

Describe the bug
Whenever i try to import the library required to use twiiter and facebook it throws the error "consumer_key and consumer_secret required to generate bearer_token via Twitter" and that only just by loading the library.

To Reproduce

!pip install git+https://github.com/lalitpagaria/obsei.git
from obsei.source.twitter_source import TwitterCredentials, TwitterSource, TwitterSourceConfig

Expected behavior
To import the library and pass the credential later on.

Stacktrace
AttributeError Traceback (most recent call last)
in ()
----> 1 from obsei.source.twitter_source import TwitterCredentials, TwitterSource, TwitterSourceConfig

2 frames
/usr/local/lib/python3.7/dist-packages/obsei/source/twitter_source.py in init(self, **data)
85 if self.consumer_key is None and self.consumer_secret is None:
86 raise AttributeError(
---> 87 "consumer_key and consumer_secret required to generate bearer_token via Twitter"
88 )
89

AttributeError: consumer_key and consumer_secret required to generate bearer_token via Twitter

Please complete the following information:

  • OS: Google Colab

Additional context
Installed the obsei using thi command : !pip install git+https://github.com/lalitpagaria/obsei.git

@tanish36 Thanks for reporting this. This is regression caused by this commit 62d3d79
I have reverted the changes in this PR #189
Please check now and let us know