質問編集履歴

2

追加修正

2018/06/18 10:04

投稿

beginner_py
beginner_py

スコア13

test CHANGED
File without changes
test CHANGED
@@ -144,7 +144,7 @@
144
144
 
145
145
  r[e] = str(r[e]).encode('utf-8')
146
146
 
147
- r[e] = r[e].replace(str('\'', '\'\''))
147
+ r[e] = r[e].replace('\'', '\'\'')
148
148
 
149
149
  -----------------------------------------------------------ーーーーー
150
150
 

1

修正

2018/06/18 10:04

投稿

beginner_py
beginner_py

スコア13

test CHANGED
File without changes
test CHANGED
@@ -132,6 +132,10 @@
132
132
 
133
133
  for e in elements:
134
134
 
135
+
136
+
137
+ エラー部分-----------------------------------------------------------
138
+
135
139
  # Convert NoneType Object as ""
136
140
 
137
141
  if (r[e] is None):
@@ -140,9 +144,9 @@
140
144
 
141
145
  r[e] = str(r[e]).encode('utf-8')
142
146
 
143
- r[e] = str(r[e]).replace(str('\'', '\'\''))
147
+ r[e] = r[e].replace(str('\'', '\'\''))
148
+
144
-
149
+ -----------------------------------------------------------ーーーーー
145
-
146
150
 
147
151
  com.append('\'{0}\''.format(r[e]))
148
152