Title: Issue with VBR wind direction and wind_dir.compass · Issue #163 · python-metar/python-metar · GitHub
Open Graph Title: Issue with VBR wind direction and wind_dir.compass · Issue #163 · python-metar/python-metar
X Title: Issue with VBR wind direction and wind_dir.compass · Issue #163 · python-metar/python-metar
Description: I am working on a Program to display the Current weather on a Raspberry Pi. I'd like to display the wind direction and the closest I found is the variable wind_dir.compass. However when the wind direction is listed as VBR. I get the foll...
Open Graph Description: I am working on a Program to display the Current weather on a Raspberry Pi. I'd like to display the wind direction and the closest I found is the variable wind_dir.compass. However when the wind di...
X Description: I am working on a Program to display the Current weather on a Raspberry Pi. I'd like to display the wind direction and the closest I found is the variable wind_dir.compass. However when the win...
Opengraph URL: https://github.com/python-metar/python-metar/issues/163
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue with VBR wind direction and wind_dir.compass","articleBody":"I am working on a Program to display the Current weather on a Raspberry Pi. I'd like to display the wind direction and the closest I found is the variable wind_dir.compass. However when the wind direction is listed as VBR. I get the following error:\r\n\r\nAttributeError: 'NoneType' object has no attribute 'compass'\r\n\r\nHere is a Sample script I use to reproduce this error. If you change the input code between the 2 listed in the script you can make the error happen or not.\r\n\r\n```python\r\n\r\nfrom __future__ import print_function\r\n\r\nfrom metar import Metar\r\n\r\n# A sample METAR report\r\ncode = (\r\n# \"K12N 121754Z AUTO 36007G16KT 330V040 M01/M04 A2931 RMK AO1 SLP934 P0001 60042 T10111044 10056 21017 56042\"\r\n \"K12N 082154Z AUTO VRB03KT 07/M09 A3013 RMK AO1 SLP208 T00721089\"\r\n)\r\n\r\nprint(\"-----------------------------------------------------------------------\")\r\nprint(\"METAR: \", code)\r\nprint(\"-----------------------------------------------------------------------\")\r\n\r\n# Initialize a Metar object with the coded report\r\nobs = Metar.Metar(code)\r\n\r\n# Print the individual data\r\n\r\n# The 'station_id' attribute is a string.\r\nprint(\"station: %s\" % obs.station_id)\r\n\r\n\r\nprint(\"Compass: \" + obs.wind_dir.compass())\r\n\r\nprint(\"-----------------------------------------------------------------------\\n\")\r\n'''","author":{"url":"https://github.com/taftr1","@type":"Person","name":"taftr1"},"datePublished":"2022-03-15T16:45:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/163/python-metar/issues/163"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bb782d55-5675-e4a9-cb44-ef8955e96731 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBE6:162063:1203466:18EC607:69777309 |
| html-safe-nonce | 1266c407f29dd3bd99c607429e6bd54532b255651ccaf34964c367badc0096ba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkU2OjE2MjA2MzoxMjAzNDY2OjE4RUM2MDc6Njk3NzczMDkiLCJ2aXNpdG9yX2lkIjoiNjUwNDg0NTYxNTAxMDY0MDY0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5c358eb6946364e41c44c376bbbe85723011028d7cb18032721ed4a67e6f00f8 |
| hovercard-subject-tag | issue:1169926216 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-metar/python-metar/163/issue_layout |
| twitter:image | https://opengraph.githubassets.com/23d20ef99b540e1dd56db5f4c070265efd2cdc70b277bee5e219ec5ad6bd5b0e/python-metar/python-metar/issues/163 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/23d20ef99b540e1dd56db5f4c070265efd2cdc70b277bee5e219ec5ad6bd5b0e/python-metar/python-metar/issues/163 |
| og:image:alt | I am working on a Program to display the Current weather on a Raspberry Pi. I'd like to display the wind direction and the closest I found is the variable wind_dir.compass. However when the wind di... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | taftr1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9fea6af76c6e24ca5c5728a18d4220d768790d04abe1ba6aafa18526daff96e7 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-metar/python-metar git https://github.com/python-metar/python-metar.git |
| octolytics-dimension-user_id | 41550127 |
| octolytics-dimension-user_login | python-metar |
| octolytics-dimension-repository_id | 111772 |
| octolytics-dimension-repository_nwo | python-metar/python-metar |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 111772 |
| octolytics-dimension-repository_network_root_nwo | python-metar/python-metar |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6c4a3fa336c0d96309887d0be819777cadd37121 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width