2012-11-09 58 views
0

錯誤:Django的collectstatic錯誤

 

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\core\management\__init__.py", line 459, in execute_manager
utility.execute()
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\core\management\__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\core\management\base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\core\management\base.py", line 232, in execute
output = self.handle(*args, **options)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\core\management\base.py", line 371, in handle
return self.handle_noargs(**options)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\contrib\staticfiles\management\commands\collectstatic.py", line 163, in handle_noargs
collected = self.collect()
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\contrib\staticfiles\management\commands\collectstatic.py", line 113, in collect
handler(path, prefixed_path, storage)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\contrib\staticfiles\management\commands\collectstatic.py", line 287, in copy_file
if not self.delete_file(path, prefixed_path, source_storage):
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\contrib\staticfiles\management\commands\collectstatic.py", line 219, in delete_file
self.storage.modified_time(prefixed_path)
File "D:\CODE\wamp\www\AMBIENTES\env\Lib\site-packages\django\core\files\storage.py", line 264, in modified_time
return datetime.fromtimestamp(os.path.getmtime(self.path(name)))
ValueError: timestamp out of range for platform localtime()/gmtime() function

(env) D:\CODE\wamp\www\lezcheung\lezcms>

任何人都知道幫我嗎?

回答

0

這看起來像是由collectstatic收集的文件造成了最後修改的時間戳(如1970年之前)的過分不準確。嘗試搜索谷歌工具,使您可以修改文件的最後修改日期,並將其更改爲合理的。

0

我編舞。

這只是因爲我在/ static/fonts /中放置了一些字體,並且django不接受靜態文件夾上的字體。所以,我將這些文件改爲/ media/fonts /。

工作! :D

相關問題