question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

percentile() got an unexpected keyword argument 'interpolation'

See original GitHub issue

Hi, this my very first try working with my raspberry pi updated with all packages. I get this when starting the script

Started WebServer, lendingbot status available at http://localhost:8000/lendingbot.html
2017-01-13 19:25:26 Error: percentile() got an unexpected keyword argument 'interpolation'
Traceback (most recent call last):
  File "lendingbot.py", line 69, in <module>
    Lending.lend_all()
  File "/home/pi/poloniexlendingbot/modules/Lending.py", line 141, in lend_all
    usable_currencies += lend_cur(cur, total_lended, lending_balances)
  File "/home/pi/poloniexlendingbot/modules/Lending.py", line 163, in lend_cur
    recommended_min = Analysis.get_rate_suggestion(active_cur)
  File "/home/pi/poloniexlendingbot/modules/MarketAnalysis.py", line 118, in get_rate_suggestion
    result = numpy.percentile(rates, int(percentile), interpolation='linear')
TypeError: percentile() got an unexpected keyword argument 'interpolation'

Unhandled error, please open a Github issue so we can fix it!
2017-01-13 19:35:28 Error: percentile() got an unexpected keyword argument 'interpolation'
Traceback (most recent call last):
  File "lendingbot.py", line 69, in <module>
    Lending.lend_all()
  File "/home/pi/poloniexlendingbot/modules/Lending.py", line 141, in lend_all
    usable_currencies += lend_cur(cur, total_lended, lending_balances)
  File "/home/pi/poloniexlendingbot/modules/Lending.py", line 163, in lend_cur
    recommended_min = Analysis.get_rate_suggestion(active_cur)
  File "/home/pi/poloniexlendingbot/modules/MarketAnalysis.py", line 118, in get_rate_suggestion
    result = numpy.percentile(rates, int(percentile), interpolation='linear')
TypeError: percentile() got an unexpected keyword argument 'interpolation'

Unhandled error, please open a Github issue so we can fix it!

Regards chris

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dshopovcommented, Jan 13, 2017

Hello ChrisG2711,

Raspbian repository have old version of python-numpy. You have 3 options:

  1. Remove the package and install the newer version via pip
  2. Just remove the package and rely on “manual percentile method”. Bot will complain but will work.
  3. Comment out all Market Analysis lines in your config and it will work without it

Regards, Dimitar

0reactions
Evanitocommented, Jan 14, 2017

@mikemr I believe a working alternative is sudo apt-get install python-numpy if you have access to that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interpolate doesn't work for numpy percentile - Stack Overflow
percentile and it gives me the error: TypeError: percentile() got an unexpected keyword argument 'interpolation' Is there any way to fix this?
Read more >
percentile() got an unexpected keyword argument 'axis' · Issue ...
Expected code to return percentiles of daily temperature for each latitude and longitude. Problem Description. Code works fine on a different ...
Read more >
dask.array.percentile - Dask documentation
Source code for dask.array.percentile ... kwargs: raise TypeError( f"percentile() got an unexpected keyword argument {kwargs.keys()}" ) if not a.ndim == 1: ...
Read more >
numpy.nanpercentile — NumPy v1.24 Manual
Compute the qth percentile of the data along the specified axis, while ignoring nan values. Returns the qth percentile(s) of the array elements....
Read more >
pandas.DataFrame.quantile — pandas 1.5.2 documentation
This optional parameter specifies the interpolation method to use, when the desired quantile lies between two ... Numpy function to compute the percentile....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found