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

get_detail_data_frame() fails for a single event #245

Open
johndwest opened this issue Jun 20, 2021 · 0 comments
Open

get_detail_data_frame() fails for a single event #245

johndwest opened this issue Jun 20, 2021 · 0 comments
Labels

Comments

@johndwest
Copy link

Describe the bug
get_detail_data_frame() fails when passed a DetailEvent object for a single event

To Reproduce
Using get_event_by_id(evenitid='usp0009kkb') , retrieve a single DetailEvent object (here, single_event)
Call get_detail_data_frame(single_event)

This causes the following error:
Traceback (most recent call last):
File "", line 1, in
File "/home/jdw/anaconda3/envs/comcat/lib/python3.8/site-packages/libcomcat/dataframes.py", line 406, in get_detail_data_frame
inc = min(100, np.power(10, np.floor(np.log10(len(events))) - 1))
TypeError: object of type 'DetailEvent' has no len()

Expected behavior
I expect this to return a single-row detail data frame

Environment

  • OS: Ubuntu 20.04.1 LTS
  • Python Version 3.8
  • Libcomcat Version 2.0
  • Numpy Version 1.20.3

Additional context
none

@johndwest johndwest added the bug label Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant