Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweet_processor.set_options(tweet_processor.OPT.URL, AttributeError: module 'preprocessor' has no attribute 'set_options' #4

Open
Jyothsna2795 opened this issue Dec 4, 2019 · 2 comments

Comments

@Jyothsna2795
Copy link

Following error occurred while running json2text.py..............please help out

python json2text.py -i C:\Users\jyo27\my_work\tweets-collector -o C:\Users\jyo27\my_work\tweets-collector\tweet_output
extract tweets from C:\Users\jyo27\my_work\tweets-collector\out.json
tweets in json file: 15 tweets
Traceback (most recent call last):
File "json2text.py", line 105, in
extract_tweets_from_json_files(json_dir, out_dir)
File "json2text.py", line 93, in extract_tweets_from_json_files
extract_tweets_from_json(json_reader, text_writer)
File "json2text.py", line 46, in extract_tweets_from_json
text = tweet_cleaner.clean_tweet(text)
File "C:\Users\jyo27\my_work\tweets-collector\tweet_cleaner.py", line 135, in clean_tweet
tweet_processor.set_options(tweet_processor.OPT.URL,
AttributeError: module 'preprocessor' has no attribute 'set_options'

@Amani1Dridi
Copy link

hi ! if u find a solution thank u to share with me !

@gordeli
Copy link

gordeli commented Aug 5, 2022

This happens because you have both preprocessor and tweet-preprocessor libraries installed per your requirements.txt file. Both contain the module preprocessor and the one from the preprocessor library is not the one you want. Uninstall the preprocessor library and this should solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants