[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[IDV #YHN-171651]: Loading Point Data File: java.lang.NullPointerException
- Subject: [IDV #YHN-171651]: Loading Point Data File: java.lang.NullPointerException
- Date: Thu, 26 Jul 2012 14:39:21 -0600
No problem - that's why we're here! :-)
Also, you may be interested in our IDV workshop, which is going to be in
October this year.
Feel free to check out the workshop page if you're interested.
http://www.unidata.ucar.edu/events/2012TrainingWorkshop/
Cheers,
Sean
> Thanks for all of your generous help Sean.
>
> I hope I don't have to send you my file for header maintenance after future
> computations. ;)
>
> Thanks again,
>
> Patrick
> ________________________________________
> From: Unidata IDV Support [address@hidden]
> Sent: Thursday, July 26, 2012 2:15 PM
> To: Patrick C. Campbell
> Cc: address@hidden
> Subject: [IDV #YHN-171651]: Loading Point Data File:
> java.lang.NullPointerException
>
> Awesome - I'm glad it worked out! Now for the fun part...computations!
>
> Best of luck,
>
> Sean
>
> > Sean,
> >
> > OK, I changed the date. I also opened the EXCEL saved CSV file as a text
> > document, and noticed that EXCEL added a bunch of erroneous quotation marks
> > when saving. If I get rid of these too, then IDV can now read the file.
> > The added quotation marks cannot be seen unless opening in WordPad or
> > something.
> >
> > Now for computing new variables into the file, without trying to screw up
> > the header. ;)
> >
> > Thanks,
> >
> > Patrick
> > ________________________________________
> > From: Unidata IDV Support [address@hidden]
> > Sent: Thursday, July 26, 2012 2:08 PM
> > To: Patrick C. Campbell
> > Cc: address@hidden
> > Subject: [IDV #YHN-171651]: Loading Point Data File:
> > java.lang.NullPointerException
> >
> > Hi Patrick,
> >
> > The file that the IDV outputs uses the following format (as written in
> > the header):
> >
> > Time[fmt="yyyy-MM-dd HH:mm:ss"]
> >
> > and the time stamps appear in the file as:
> >
> > 2010-06-23 03:00:00
> >
> > Given that the format from the header and the way the time stamps are
> > structured in the data match, the IDV has no problem.
> >
> > However, when you load the file into Excel and then save as CSV,
> > the format (as written the header) is still listed as:
> >
> > Time[fmt=""yyyy-MM-dd HH:mm:ss""]
> >
> > but the time stamps in the data actually look like
> >
> > 6/23/2010 3:00
> >
> > because Excel changed your time stamps to its default.
> >
> > Sean
> >
> > > Sean,
> > >
> > > I will try that. So your saying once I save it again as .CSV EXCEL
> > > changes the date format? Funny, I looked at that, and if I don't save it
> > > all, IDV still reads it in OK with the incorrect date format.
> > >
> > > For example, attached is a file that I just exported from IDV without
> > > saving it externally. IDV can read this file unless I try to externally
> > > save it as a CSV.
> > >
> > > Thanks,
> > > Patrick
> > > ________________________________________
> > > From: Unidata IDV Support [address@hidden]
> > > Sent: Thursday, July 26, 2012 1:51 PM
> > > To: Patrick C. Campbell
> > > Cc: address@hidden
> > > Subject: [IDV #YHN-171651]: Loading Point Data File:
> > > java.lang.NullPointerException
> > >
> > > Hi Patrick,
> > >
> > > I see from the other support question that you were using Excel to
> > > manipulate the CSV
> > > file. It looks like Excel changed the format of your date/time stamps in
> > > the data, thus
> > > making you header incorrect. Make sure you tell Excel to use the proper
> > > date format,
> > >
> > > yyyy-MM-dd HH:mm:ss
> > >
> > > before you export to CSV.
> > >
> > > Cheers,
> > >
> > > Sean
> > >
> > > PS: Sorry for the duplicate email - just want to make sure this doesn't
> > > get lost.
> > >
> > > > Hi Sean,
> > > >
> > > > Thank you for responding. OK, here is what I do to reserve and save
> > > > the file:
> > > >
> > > > 1) Use your method to load the Mesowest data using the "Mesowest
> > > > Chooser Plugin" in IDV. I choose a region surrounding the Rocky
> > > > Mountains for June 23, 2010 - 03:00 GMT, all observations, back -12
> > > > hours.
> > > > 2) Under the Field Selector tab, point cloud is available, I choose
> > > > point data, and then choose to display a Point Data List.
> > > > 3) Under the Display tab, I then go to "Select Fields" and choose all
> > > > the variables. Under File, I choose Save and then Export Table to CSV.
> > > > 4) If I immediately try to read the new CSV, it works OK.
> > > > 5) Or, if I save the exported CSV within EXCEL, then try to read in
> > > > IDV, it doesn't work.
> > > >
> > > > Hope this helps,
> > > >
> > > > Patrick
> > > >
> > > > ________________________________________
> > > > From: Unidata IDV Support [address@hidden]
> > > > Sent: Thursday, July 26, 2012 1:06 PM
> > > > To: Patrick C. Campbell
> > > > Cc: address@hidden
> > > > Subject: [IDV #YHN-171651]: Loading Point Data File:
> > > > java.lang.NullPointerException
> > > >
> > > > Hi Patrick,
> > > >
> > > > The header in the file you sent me was indeed messed up. When you
> > > > reserved the file,
> > > > how exactly did you do it?
> > > >
> > > > Sean
> > > >
> > > > > Thanks Sean.
> > > > >
> > > > > One more issue. I have been in contact with a Yuan at your IDV
> > > > > support. He mentioned to me that if I wanted to make edits to a
> > > > > point data file, I could not use Jython functions within IDV, but
> > > > > rather export the IDV Mesowest data to a .CSV file, edit it, then
> > > > > re-read it into IDV.
> > > > >
> > > > > When testing the export of the .CSV file and re-reading in IDV, it
> > > > > works OK. However, when exporting the .CSV file, and re-saving it
> > > > > as .CSV with no edits applied to either the data or headers, IDV
> > > > > won't read it.
> > > > >
> > > > > There was an error loading the data:
> > > > > java.lang.NullPointerException
> > > > >
> > > > >
> > > > > The exported and saved .CSV file is attached. Since you noted that
> > > > > my last header was missing a few things, it seems like there is an
> > > > > issue with this header. However, this is exactly how IDV exports it
> > > > > to a .CSV file?
> > > > >
> > > > > Any insight would be much appreciated.
> > > > >
> > > > > Patrick
> > > > > ________________________________________
> > > > > From: Unidata IDV Support [address@hidden]
> > > > > Sent: Wednesday, July 25, 2012 7:52 AM
> > > > > To: Patrick C. Campbell
> > > > > Cc: address@hidden
> > > > > Subject: [IDV #YHN-171651]: Loading Point Data File:
> > > > > java.lang.NullPointerException
> > > > >
> > > > > Greetings Patrick,
> > > > >
> > > > > It looks like your header was missing a few things. Here is a header
> > > > > that works for your data file:
> > > > >
> > > > > (index)->(Time,Station(Text),Latitude,Longitude,Altitude,MNETID(Text),Mesonet(Text),T,RH,WSPD,WDIR,PSL,ALTI,TD)
> > > > > Time[fmt="yyyy-MM-dd
> > > > > HH:mm"],Station(Text)[],Latitude[unit="degrees"],Longitude[unit="degrees"],Altitude[unit="foot"],MNETID(Text)[],Mesonet(Text)[],T[unit="Celsius"
> > > > > missing="-9999"],RH[unit="percent" missing="-9999"],WSPD[unit="kt"
> > > > > missing="-9999"],WDIR[unit="degrees" missing="-9999"],PSL[unit="Pa"
> > > > > missing="-9999"],ALTI[unit="Pa" missing="-9999"],TD[unit="Celsius"
> > > > > missing="-9999"]
> > > > >
> > > > > Cheers!
> > > > >
> > > > > Sean
> > > > >
> > > > > > Sean,
> > > > > >
> > > > > > Thank you for taking a look. Also, I didn't know about the
> > > > > > "Mesowest Chooser", nor the plugin category. This is excellent!
> > > > > > Maybe I need a IDV tutorial someday.
> > > > > >
> > > > > > Patrick
> > > > > > ________________________________________
> > > > > > From: Unidata IDV Support [address@hidden]
> > > > > > Sent: Monday, July 23, 2012 4:30 PM
> > > > > > To: Patrick C. Campbell
> > > > > > Cc: address@hidden
> > > > > > Subject: [IDV #YHN-171651]: Loading Point Data File:
> > > > > > java.lang.NullPointerException
> > > > > >
> > > > > > Greetings Patrick,
> > > > > >
> > > > > > I'll be happy to take a look at this. However, did you know that
> > > > > > the IDV has a MesoWest
> > > > > > data chooser plugin available? If you click "Tools -> Plugin
> > > > > > Manager" and select the
> > > > > > "Mesowest Chooser" from the "Data Sources" plugin category, you'll
> > > > > > be able to load
> > > > > > Mesowest data from the Data Choosers interface on the IDV Dashboard.
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Sean
> > > > > >
> > > > > > > Full Name: Patrick Campbell
> > > > > > > Email Address: address@hidden
> > > > > > > Organization: University of Wyoming
> > > > > > > Package Version: 3.0u2 build date:2012-02-10 17:21 UTC
> > > > > > > Operating System: Windows 7
> > > > > > > Hardware: Java: home: C:\Program Files\IDV_3.0u2\jre version:
> > > > > > > 1.6.0_20 j3d:1.5.2 fcs (build4)
> > > > > > > Description of problem: Hello,
> > > > > > >
> > > > > > > Below is the error I am receiving when trying to load a simple
> > > > > > > point data file.
> > > > > > >
> > > > > > > There was an error loading the data:
> > > > > > > java.lang.NullPointerException
> > > > > > >
> > > > > > > I downloaded the data file in .xls format from the Mesowest
> > > > > > > website, and then changed the extension to a .csv format.
> > > > > > > Subsequently, I manipulated the file to match what I thought was
> > > > > > > a suitable format. Please see the attached point data file. I
> > > > > > > would appreciate any input on this matter.
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > Patrick Campbell
> > > > > > >
> > > > > > > There was an error loading the data:
> > > > > > > java.lang.NullPointerException
> > > > > > >
> > > > > > > ******************
> > > > > > > Stack trace:
> > > > > > > java.lang.NullPointerException
> > > > > > > at visad.Tuple.buildTupleType(Tuple.java:170)
> > > > > > > at
> > > > > > > ucar.unidata.data.point.TextPointDataSource.makePointObs(TextPointDataSource.java:2105)
> > > > > > > at
> > > > > > > ucar.unidata.data.point.TextPointDataSource.makeObs(TextPointDataSource.java:656)
> > > > > > > at
> > > > > > > ucar.unidata.data.point.TextPointDataSource.makeObs(TextPointDataSource.java:479)
> > > > > > > at
> > > > > > > ucar.unidata.data.point.TextPointDataSource.getSample(TextPointDataSource.java:2518)
> > > > > > > at
> > > > > > > ucar.unidata.data.point.PointDataSource.doMakeDataChoices(PointDataSource.java:939)
> > > > > > > at
> > > > > > > ucar.unidata.data.point.TextPointDataSource.doMakeDataChoices(TextPointDataSource.java:2526)
> > > > > > > at
> > > > > > > ucar.unidata.data.DataSourceImpl.getDataChoices(DataSourceImpl.java:1839)
> > > > > > > at
> > > > > > > ucar.unidata.data.DataManager.createDataSource(DataManager.java:1579)
> > > > > > > at
> > > > > > > ucar.unidata.idv.IntegratedDataViewer.createDataSource(IntegratedDataViewer.java:1980)
> > > > > > > at
> > > > > > > ucar.unidata.idv.IntegratedDataViewer.makeDataSource(IntegratedDataViewer.java:1897)
> > > > > > > at
> > > > > > > ucar.unidata.idv.IntegratedDataViewer.makeDataSource(IntegratedDataViewer.java:1831)
> > > > > > > at
> > > > > > > ucar.unidata.idv.IntegratedDataViewer.makeDataSource(IntegratedDataViewer.java:1804)
> > > > > > > at
> > > > > > > ucar.unidata.idv.chooser.IdvChooser.makeDataSource(IdvChooser.java:943)
> > > > > > > at
> > > > > > > ucar.unidata.idv.chooser.FileChooser.selectFilesInner(FileChooser.java:656)
> > > > > > > at
> > > > > > > ucar.unidata.idv.chooser.FileChooser.selectFiles(FileChooser.java:525)
> > > > > > > at
> > > > > > > ucar.unidata.idv.chooser.FileChooser.doLoadInThread(FileChooser.java:547)
> > > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > > > > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > > > > > > at java.lang.reflect.Method.invoke(Unknown Source)
> > > > > > > at ucar.unidata.util.Misc$2.run(Misc.java:1062)
> > > > > > > at ucar.unidata.util.Misc$3.run(Misc.java:1090)
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > Ticket Details
> > > > > > ===================
> > > > > > Ticket ID: YHN-171651
> > > > > > Department: Support IDV
> > > > > > Priority: Normal
> > > > > > Status: Open
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > Ticket Details
> > > > > ===================
> > > > > Ticket ID: YHN-171651
> > > > > Department: Support IDV
> > > > > Priority: Normal
> > > > > Status: Closed
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: YHN-171651
> > > > Department: Support IDV
> > > > Priority: Normal
> > > > Status: Open
> > > >
> > > >
> > > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: YHN-171651
> > > Department: Support IDV
> > > Priority: Normal
> > > Status: Open
> > >
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: YHN-171651
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> >
> >
> >
>
>
> Ticket Details
> ===================
> Ticket ID: YHN-171651
> Department: Support IDV
> Priority: Normal
> Status: Closed
>
>
>
Ticket Details
===================
Ticket ID: YHN-171651
Department: Support IDV
Priority: Normal
Status: Closed