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

Fix TypeError in Python 3 #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pikamander2
Copy link

Fix TypeError in Python 3 (can only concatenate str (not "numpy.float64") to str)

Fix TypeError in Python 3 (can only concatenate str (not "numpy.float64") to str)
@Pikamander2
Copy link
Author

I was trying out ImageAI for the first time and noticed that one of the examples throws a TypeError when you try to run it.

The eachProbability variable needs to be cast into a string before concatenating it, so I wrapped a call to str() around it.

I also cast the eachPrediction variable to a string just to be safe, although that may not be necessary.

@codecov
Copy link

codecov bot commented Oct 5, 2020

Codecov Report

Merging #590 into master will decrease coverage by 38.17%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #590       +/-   ##
===========================================
- Coverage   48.83%   10.66%   -38.18%     
===========================================
  Files          63       24       -39     
  Lines        5856     3450     -2406     
===========================================
- Hits         2860      368     -2492     
- Misses       2996     3082       +86     

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

Successfully merging this pull request may close these issues.

None yet

1 participant