mscross / pysplit

A package for HYSPLIT air parcel trajectory analysis.
BSD 3-Clause "New" or "Revised" License
144 stars 79 forks source link

An issue with labelfile_generator #73

Open tingvan opened 3 years ago

tingvan commented 3 years ago

Hi Mellissa I just followed your 2018 paper. And I met with this problem when running codes from line 74 to 76.

# Make then edit text file of labels
pysplit.labelfile_generator(r'F:/trajectories/umn/umnlabels.txt', example='west')

Then, a KeyError is reported:

KeyError                                  Traceback (most recent call last)
<ipython-input-18-5f357be86803> in <module>()
      1 # Make then edit text file of labels
----> 2 pysplit.labelfile_generator(r'F:\trajectories\umn\umnlabels.txt', example=['west'])

B:\anaconda3\envs\pysplitenv\lib\site-packages\pysplit\maplabeller.py in labelfile_generator(labelfile, example)
    257         example = 'east'
    258 
--> 259     labels = lbdict['example']
    260 
    261     with open(labelfile, 'w') as labelfile:

KeyError: 'example'

How can I solve this problem?

Best regards, Tingvan