[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #JSZ-319860]: Attribute Error



Hello, thanks for reaching out!

Please double check your imports and make sure you're referencing modules by 
their correct name. You need to import the `metpy.calc` module and reference it 
appropriately, for example:

  import metpy.calc as mpcalc
  
  mpcalc.get_wind_dir(u_wind, v_wind)

See this example in action in this community notebook (not tested or maintained 
by Unidata) based on that MetPy Mondays episode here: 
https://github.com/cssjessica/metpyMondays/blob/main/2018/metpyMonday38.ipynb

I hope this helps! Please follow up with a snippet of your code if not.


All the best,

Drew


> I'm trying to make hodohraph by coding python script like in your youtube
> video MetPy mondays #38: Making a Hodohraph. Unfortunately, I'm stucked on
> 
> print(mpcalc.get_wind_dir(u_wind, v_wind))
> AttributeError: Module MetPy has no attribute 'get_wind_dir'
> 


Ticket Details
===================
Ticket ID: JSZ-319860
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.