0
私は私のDjangoのプロジェクトで私の空港ファイルをインポートしようとしたとき、私は以下の取得:ジャンゴ - 空港
INFO Downloading: airports.dat
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 342, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/airports/management/commands/airports.py", line 50, in handle
with open(self.download(), 'rt') as f:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/airports/management/commands/airports.py", line 64, in download
response.raise_for_status()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 909, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat
がなぜ起こっていますか?おかげでたくさん
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.datを同じマシンのブラウザからダウンロードできますか? –
コピーして.txtファイルに貼り付けない限り、ダウンロードできません。 –
あなたは私を助けてもらえますか?@RobHunter –