sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
216 stars 112 forks source link

sharppy.sharptab has no attribute 'profile' #76

Closed lmadaus closed 8 years ago

lmadaus commented 8 years ago

Hello all,

I was updating my python distribution today and used git to clone the latest sharppy release code. I've got several scripts (following the scripting tutorial) that go through and generate profile objects. However, with this new release, I'm getting the following error: (after import sharppy.sharptab as tab) tab.profile : 'module' object has no attribute 'profile'

I noticed you had a previous issue/bug where you were changing how you handled that import...has this syntax changed?

tsupinie commented 8 years ago

Hey, Luke!

Yeah, I did enforce an import syntax change. The new imports should be explicit (I went with the "explicit is better than implicit" philosophy). So the proper import syntax should be

import sharppy.sharptab.profile as profile

aarande commented 8 years ago

Hi Tim, The import should be from sharppy.sharptab import profile You should avoid using as in an import at all costs and it is not needed in this case.  Thanks,Aaron

Sent via the Samsung Galaxy Note® 4, an AT&T 4G LTE smartphone

-------- Original message -------- From: Tim Supinie notifications@github.com Date: 10/13/2015 10:41 AM (GMT-06:00) To: sharppy/SHARPpy SHARPpy@noreply.github.com Subject: Re: [SHARPpy] sharppy.sharptab has no attribute 'profile' (#76)

Hey, Luke!

Yeah, I did enforce an import syntax change. The new imports should be explicit (I went with the "explicit is better than implicit" philosophy). So the proper import syntax should be

import sharppy.sharptab.profile as profile

— Reply to this email directly or view it on GitHub.

lmadaus commented 8 years ago

That's working for me now. Though I also have to explicitly import param, thermo and interp as well when I want to use those. I guess the examples/docs should be updated to reflect this.

Thanks for getting back on this!