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_cik_map() causes AttributeError due object type "None" in returned list #261

Open
niklascube opened this issue Jan 4, 2022 · 5 comments
Labels

Comments

@niklascube
Copy link

Description
Using the method get_cik_map() of the module cik_lookup an AttributeError with the message "'NoneType' object has no attribute 'upper'" is generated. This error occurs because in the returned list an object has the type NULL.

Object of matter: {"cik_str":1104206,"ticker":"RIGG","title":null}

To Reproduce
Just start the method get_cik_map() from module cik_lookup.

Error
image

My system
MacBook Pro 2021

@niklascube
Copy link
Author

niklascube commented Jan 4, 2022

Just saw, somebody already tried to fix the issue by just skipping the entry. I have something in store which replaces the skip with an empty string in the object.

niklascube added a commit to niklascube/sec-edgar that referenced this issue Jan 4, 2022
@jackmoody11
Copy link
Member

jackmoody11 commented Jan 4, 2022

Hi @niklascube, I think this should be fixed. Can you try using the latest code in master?

See #256.

@niklascube
Copy link
Author

Hi @niklascube, I think this should be fixed. Can you try using the latest code in master?

See #256.

Not really. The current solution skips the whole object, so that the mentioned RIGG entry is deleted. My solution does not skip the object and returns the object with an empty title. The cik is returned probably then.

@jackmoody11 jackmoody11 reopened this Jan 6, 2022
@niklascube
Copy link
Author

I've made a suggestion on my forked repo: niklascube@495c688

@jackmoody11 may you have a look?

@jackmoody11
Copy link
Member

@niklascube if multiple tickers or company names are missing, won't the empty string key be overwritten?

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

2 participants