我試圖安裝jquery-ui-dist軟件包,並且當我運行collectstatic時,whitenoise在樣式表中的引號內似乎遇到了麻煩。Whitenoise在執行collectstatic時給jquery-ui.css上的錯誤
我得到的錯誤是:
MissingFileError: The file 'jquery-ui-dist/"images/ui-icons_555555_256x240.png"' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7fb16b7000b8>.
The CSS file 'jquery-ui-dist/jquery-ui.css' references a file which could not be found:
jquery-ui-dist/"images/ui-icons_555555_256x240.png"
Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.
我看到它似乎認爲它在尋找一個壞的文件名,因爲它使周圍的報價,和我認爲的原因是因爲源文件有url("images/ui-icons_555555_256x240.png")
的時候報價是不必要的,所以我在源文件上跑sed -i 's/\"images\/ui-icons_555555_256x240.png\"/images\/ui-icons_555555_256x240.png/g' jquery-ui.css
,這個刪除了引號,但是我仍然得到錯誤。
我假設有一個whitenoise或jquery-ui-dist軟件包出現問題,但在問題解決之前,我至少需要一個臨時解決方案,而且我甚至不知道在哪裏實際的問題在於。
編輯:
我發現它是在CSS文件導致該問題的意見。我不知道爲什麼whitenoise是解析評論,但我也不知道我能做些什麼,除了手動刪除這些評論。