首页 文章

Django collectstatic错误

提问于
浏览
0

错误:

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>

有谁知道帮帮我?

2 回答

  • 0

    这看起来像是由于_534350收集的文件导致上次修改后的时间戳非常不准确(如1970年之前) . 尝试在Google上搜索可以修改文件上次修改日期并将其更改为合理日期的工具 .

  • 0

    我心不在焉 .

    这只是因为我在/ static / fonts /中放了一些字体而且django不接受静态文件夹上的字体 . 所以,我将这些文件更改为/ media / fonts / .

    成功了! :d

相关问题