質問するログイン新規登録

質問編集履歴

1

エラーメッセージの追加

2019/11/21 06:38

投稿

mackerel6.023
mackerel6.023

スコア317

title CHANGED
File without changes
body CHANGED
@@ -32,4 +32,24 @@
32
32
  ファイルの書き込みはSJISを指定して書き込んでおり、それについては日本語が含まれていても問題なく書き込めるので、文字コードが扱えないわけではない。
33
33
 
34
34
  ## 知りたいこと
35
- 回避方法があれば教えてほしいです。
35
+ 回避方法があれば教えてほしいです。
36
+
37
+ ## エラーメッセージ(追記)
38
+ ```
39
+ Internal Server Error: /create_csvfile, referer: http://testhost/result
40
+ Traceback (most recent call last):, referer: http://testhost/result
41
+ File "/python/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner, referer: http://testhost/result
42
+ response = get_response(request), referer: http://testhost/result
43
+ File "/python/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response, referer: http://testhost/result
44
+ response = self.process_exception_by_middleware(e, request), referer: http://testhost/result
45
+ File "/python/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response, referer: http://testhost/result
46
+ response = wrapped_callback(request, *callback_args, **callback_kwargs), referer: http://testhost/result
47
+ File "/python/venv/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view, referer: http://testhost/result
48
+ return view_func(*args, **kwargs), referer: http://testhost/result
49
+ File "/my_app/main/views.py", line 29, in create_csvfile, referer: http://testhost/result
50
+ google_maping_obj.saveCsv(keyword), referer: http://testhost/result
51
+ File "/my_app/scraping/get_csvfile.py", line 56, in saveCsv, referer: http://testhost/result
52
+ with open(filename, 'w', encoding='SJIS') as fp:, referer: http://testhost/result
53
+ UnicodeEncodeError: 'ascii' codec can't encode characters in position 69-76: ordinal not in range(128), referer: http://testhost/result
54
+ , referer: http://testhost/result
55
+ ```