FakeNewsNet_modified icon indicating copy to clipboard operation
FakeNewsNet_modified copied to clipboard

Problem with collecting tweets

Open Daipure opened this issue 11 months ago • 1 comments

I can download news content normally, but the following error occurs when collecting tweets.How can I fix this problem? Error: Downloading politifact fake politifact15014 tweets Traceback (most recent call last): File "main.py", line 70, in download_dataset() File "main.py", line 66, in download_dataset data_collector.collect_data(data_choices) File "/home/server/Dai/FakeNewsNet_modified/code/tweet_collection.py", line 66, in collect_data collect_tweets(news_list, choice["news_source"], choice["label"], self.config) File "/home/server/Dai/FakeNewsNet_modified/code/tweet_collection.py", line 27, in collect_tweets data = pd.DataFrame(columns= features) File "/home/server/.conda/envs/fakenewsnet/lib/python3.7/site-packages/pandas/core/frame.py", line 411, in init mgr = init_dict(data, index, columns, dtype=dtype) File "/home/server/.conda/envs/fakenewsnet/lib/python3.7/site-packages/pandas/core/internals/construction.py", line 242, in init_dict val = construct_1d_arraylike_from_scalar(np.nan, len(index), nan_dtype) File "/home/server/.conda/envs/fakenewsnet/lib/python3.7/site-packages/pandas/core/dtypes/cast.py", line 1221, in construct_1d_arraylike_from_scalar dtype = dtype.dtype AttributeError: type object 'object' has no attribute 'dtype'

Daipure avatar Mar 14 '24 06:03 Daipure

Hi there I have not supported, or tested this project for years. So i do not know, if the API changed or something else. But my guess based on your error message, is that the return type of some object has changed over time. File "/home/server/Dai/FakeNewsNet_modified/code/tweet_collection.py", line 27, in collect_tweets data = pd.DataFrame(columns= features) This line appears to want to access some object, that does not come with the dtypes field. Maybe use the debugger to find out, what kind of object is being passed in features.

SaschaStenger avatar Mar 21 '24 13:03 SaschaStenger