Python TypeError:plotdatehist()获取了意外的关键字参数

Python TypeError:plotdatehist()获取了意外的关键字参数,python,typeerror,Python,Typeerror,如果这是一个愚蠢的问题,请提前道歉 我一直在使用曼彻斯特大学的一些代码来记录、分析和图形化显示鸟箱活动,使用红外发射器/接收器,使用树莓圆周率。 无论如何,我在图形显示部分遇到了一个问题 导致错误的代码部分是: intervalsize = 20*60 histogramBins = math.ceil(float(numberOfSeconds)/float(intervalSize)) #draw the graph fig = plotDatehist(events, bins=his

如果这是一个愚蠢的问题,请提前道歉

我一直在使用曼彻斯特大学的一些代码来记录、分析和图形化显示鸟箱活动,使用红外发射器/接收器,使用树莓圆周率。 无论如何,我在图形显示部分遇到了一个问题

导致错误的代码部分是:

intervalsize = 20*60

histogramBins = math.ceil(float(numberOfSeconds)/float(intervalSize))

#draw the graph
fig = plotDatehist(events, bins=histogramBins,title="Bird Box Activity", intervalSize=intervalSize)
不断出现的错误是

TypeError:plotDatehist() got an unexpected keyword argument 'bins'

我听说更新软件可以解决类似的问题,但据我所知,一切都是最新的。

plotDatehist方法没有bins参数。这本书是从曼彻斯特大学来的人写的,我的一部分被逐字地抄袭了,我无法想象它为什么不起作用。你能试着张贴方法签名(它是“DEF”行)吗?如果没有,请尝试
import inspect
,然后
print(inspect.getargspec(plotDateHist))
,这样该方法就不会有
bins
参数,您可以清楚地看到。你为什么要通过考试?