Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
214 views
in Technique[技术] by (71.8m points)

Error message in python 3 object has no attribute 'min_data'

I am new to python and I wondered if anyone could interpret what this error message means for me? I am trying to run lead 210 data using PyPlum https://github.com/maquinolopez/PyPlum/blob/PyPlum/README.md

I have downloaded all of the requirements using either conda install -c conda-forge or sudo easy_install and I am using miniconda. There definitely is data in the folder so I am not sure what it is telling me?

Thanks

My code is as follows:

conda activate my-py

   cd pytwalk-1.5

   sudo python3 setup.py install

   cd /Users/sophiewilliams/PyPlum

   python3

   import PyPlum as Plum

   BB = Plum.Plum("BB")

   BB.runPlum()

That should run the model however I am getting the error:

BB = Plum.Plum("BB")>>> BB = Plum.Plum("BB")
There is no 210Pb data
There is no 14C data or calendar dates
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sophiewilliams/PyPlum/PyPlum.py", line 85, in __init__
    self.def_breaks()
  File "/Users/sophiewilliams/PyPlum/PyPlum.py", line 117, in def_breaks
    self.breaks         =   array(arange(min(self.min_data,self.min_date),max(self.max_data,self.max_date)+2*self.by,self.by))
AttributeError: 'Plum' object has no attribute 'min_data'
>>> BB = Plum.Plum("BB")
There is no 210Pb data
There is no 14C data or calendar dates
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sophiewilliams/PyPlum/PyPlum.py", line 85, in __init__
    self.def_breaks()
  File "/Users/sophiewilliams/PyPlum/PyPlum.py", line 117, in def_breaks
    self.breaks         =   array(arange(min(self.min_data,self.min_date),max(self.max_data,self.max_date)+2*self.by,self.by))
AttributeError: 'Plum' object has no attribute 'min_data'

Image of csv

question from:https://stackoverflow.com/questions/65883812/error-message-in-python-3-object-has-no-attribute-min-data

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I checked this source file and it seems that the Plum object had not loaded some 14C data to self.min_data in the load_data method.

Make sure that you have a ~/Documents/PyPlum/BB/BB-C.csv file containing the 14C data. (I have no idea what that is..)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...