回答編集履歴

2

マークダウン誤記修正

2017/03/14 04:59

投稿

can110
can110

スコア38262

test CHANGED
@@ -36,7 +36,9 @@
36
36
 
37
37
  --
38
38
 
39
- こちらの環境(Win10)で試したところ、返信データ中に[お天気Webサービス仕様](http://weather.livedoor.com/weather_hacks/webservice)に記載されている`min・・・最低気温`データが存在しませんでした(季節による?)。以下のようにするとデータなしでも```jsay```処理前までは正しく動作しました。こちら```JTalk``'環境ないのでそれ以降は未検証です。
39
+ こちらの環境(Win10)で試したところ、返信データ中に[お天気Webサービス仕様](http://weather.livedoor.com/weather_hacks/webservice)に記載されている```min・・・最低気温```データが存在しませんでした(季節による?)。以下のようにするとデータなしでも```jsay```処理前までは正しく動作しました。こちら```JTalk```環境ないのでそれ以降は未検証です。
40
+
41
+
40
42
 
41
43
  ```Python
42
44
 

1

検証結果を追記

2017/03/14 04:59

投稿

can110
can110

スコア38262

test CHANGED
@@ -29,3 +29,41 @@
29
29
  :
30
30
 
31
31
  ```
32
+
33
+
34
+
35
+ 検証結果を追記
36
+
37
+ --
38
+
39
+ こちらの環境(Win10)で試したところ、返信データ中に[お天気Webサービス仕様](http://weather.livedoor.com/weather_hacks/webservice)に記載されている`min・・・最低気温`データが存在しませんでした(季節による?)。以下のようにするとデータなしでも```jsay```処理前までは正しく動作しました。こちら```JTalk``'環境ないのでそれ以降は未検証です。
40
+
41
+ ```Python
42
+
43
+ (略)
44
+
45
+ today_w_txt = weather_text % (cast['dateLabel'], cast['telop'])
46
+
47
+
48
+
49
+ # 最高、最低気温を取得。データが存在しない場合もある
50
+
51
+ temp_max = ""
52
+
53
+ temp_min = ""
54
+
55
+ if temperature['max'] is not None:
56
+
57
+ temp_max = temperature['max']['celsius']
58
+
59
+ if temperature['min'] is not None:
60
+
61
+ temp_max = temperature['min']['celsius']
62
+
63
+
64
+
65
+ today_t_txt = temperature_text % (cast['dateLabel'], temp_max, temp_min)
66
+
67
+ (略)
68
+
69
+ ```