gwu-libraries / TweetSets

Service for creating Twitter datasets for research and archiving.
MIT License
25 stars 2 forks source link

T85 select one dataset #106

Closed lwrubel closed 3 years ago

lwrubel commented 3 years ago

To test: confirm that selection of a single dataset works, add search criteria, and confirm exports work. Review UI to be sure I caught all of the references to selecting datasets (aside from the help page, which has its own issue).

dolsysmith commented 3 years ago
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 367, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/tweetsets/utils.py", line 21, in __call__
    return self.run(*args, **kwargs)
  File "/opt/tweetsets/tweetset_server.py", line 629, in _generate_tasks
    generate_update_increment=generate_update_increment)
  File "/opt/tweetsets/tasks.py", line 24, in generate_tasks
    search = dataset_params_to_search(dataset_params)
  File "/opt/tweetsets/utils.py", line 47, in dataset_params_to_search
    for source_dataset in dataset_params.get('source_datasets'):
TypeError: 'NoneType' object is not iterable

The source_datasets parameter passed from the form needs to be a list. It is now a string. Also, the key expected issource_datasets, but it is now source_dataset. Either dataset_params_to_search (in utils.py) should be refactored, or the parameter from the form changed.

lwrubel commented 3 years ago

Thanks for catching the issue with the date selector, will fix that.

I had seen and struggled with the TypeError you saw, until I realized the worker container was using the master branch of the code. The code that the error references is not in this branch's version of utils.py. Could you try rebuilding that image and see if that resolves it?

dolsysmith commented 3 years ago

Okay, that did it! Ready to merge.

lwrubel commented 3 years ago

Ready for one more review, with the stats page fixed.

dolsysmith commented 3 years ago

Statistics are working now!