質問編集履歴

3

文法の修正

2020/03/07 03:24

投稿

kom12
kom12

スコア6

test CHANGED
File without changes
test CHANGED
@@ -52,66 +52,6 @@
52
52
 
53
53
 
54
54
 
55
- #!/usr/bin/python
56
-
57
- # -*- coding: utf-8 -*-
58
-
59
- import gspread
60
-
61
- import MyPyDHT
62
-
63
- import datetime
64
-
65
- from oauth2client.service_account import ServiceAccountCredentials
66
-
67
-
68
-
69
- humidity, temperature = MyPyDHT.sensor_read(MyPyDHT.Sensor.DHT22, 15)
70
-
71
-
72
-
73
- dt_now = datetime.datetime.now()
74
-
75
- print(dt_now.strftime('%Y年%m月%d日 %H:%M:%S'))
76
-
77
-
78
-
79
- # 結果の表示
80
-
81
- print("Temp=" + str(temperature) + "*C, Humidity = " + str(humidity) + "%")
82
-
83
-
84
-
85
-
86
-
87
- key_name = ''
88
-
89
- sheet_name = ''
90
-
91
-
92
-
93
- #APIにログイン
94
-
95
- scope = []
96
-
97
-
98
-
99
- workbook = gc.open_by_key('')
100
-
101
- worksheet = workbook.sheet1
102
-
103
-
104
-
105
- datas = [dt_now.strftime('%Y年%m月%d日 %H:%M:%S'), str(temperature) + "*C",str(humidity) + "%" ]
106
-
107
- worksheet.append_row(datas)
108
-
109
-
110
-
111
- for row_data in datas:
112
-
113
- worksheet.append_row(row_data)
114
-
115
55
 
116
56
 
117
57
  ```

2

2020/03/07 03:23

投稿

kom12
kom12

スコア6

test CHANGED
File without changes
test CHANGED
@@ -48,11 +48,9 @@
48
48
 
49
49
 
50
50
 
51
- ```python
51
+ ``python
52
52
 
53
- ソースコード
54
53
 
55
- ```
56
54
 
57
55
  #!/usr/bin/python
58
56
 
@@ -113,3 +111,7 @@
113
111
  for row_data in datas:
114
112
 
115
113
  worksheet.append_row(row_data)
114
+
115
+
116
+
117
+ ```

1

2020/03/05 21:48

投稿

kom12
kom12

スコア6

test CHANGED
@@ -1 +1 @@
1
- gspreadのappend_rowを使用した時に
1
+ gspreadのappend_rowを使用した時に発生するエラーについて
test CHANGED
File without changes