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

TypeError: cannot unpack non-iterable numpy.float64 object #21

Closed
rlashare opened this issue Nov 23, 2020 · 3 comments
Closed

TypeError: cannot unpack non-iterable numpy.float64 object #21

rlashare opened this issue Nov 23, 2020 · 3 comments

Comments

@rlashare
Copy link

hi there,
Having trouble with Step 4. I get the following error: TypeError: cannot unpack non-iterable numpy.float64 object (also pasted below). In case it's helpful, I'm attaching the cleanedBib.csv file generated in Step 2 and updated before I ran Step 3 (which seemed to run fine though the incompleteKeys.csv and incompleteRows.csv are both empty). Not a coder but would love to be able to use this tool - thanks so much for posting it!

cleanedBib.pdf

first author is Rebecca Ashare
last author is Robert Schnoll
we don't count these, but check the predictions file to ensure your names did not slip through!
looping through your references, predicting gender and race
/srv/conda/envs/notebook/lib/python3.7/site-packages/numpy/core/fromnumeric.py:3373: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/srv/conda/envs/notebook/lib/python3.7/site-packages/numpy/core/_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)

TypeError Traceback (most recent call last)
in
175 idx = idx + 1
176
--> 177 mm,wm,mw,ww = np.mean(gender,axis=0)*100
178 WW,aw,wa,aa = np.mean(race,axis=0)*100
179

TypeError: cannot unpack non-iterable numpy.float64 object

@dalejn
Copy link
Owner

dalejn commented Nov 23, 2020

Thanks for your interest in using our tool! I'm happy to help debug.

Could you send me the .bib file that you uploaded to generate the cleanedBib.csv file that you attached?

@rlashare
Copy link
Author

rlashare commented Nov 23, 2020 via email

@dalejn
Copy link
Owner

dalejn commented Nov 30, 2020

Thanks again for using our tool! To summarize: resolved this issue by adding instructions pointing to previous code for analyzing published papers, under Can I use this code to analyze published article(s) instead of manuscripts in progress? Sent email with the result of running the .bib file successfully through the code with the modified instructions. Will work on re-integrating this feature of analyzing published articles to the main line analysis including race predictions and probabilistic calculation of proportions.

@dalejn dalejn closed this as completed Nov 30, 2020
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

2 participants