TypeError when concatenating django.test.LiveServerTestCase's live_server_url with another string

試著忘記壹切 提交于 2019-12-01 23:47:36

See this discussion on Reddit featuring the same error Traceback.

Basically, this is not a problem with anything within the Selenium tests but rather with your project's static file configuration.

From your question, I believe the key line within the Traceback is:

File "/usr/local/lib/python3.4/site-packages/django/views/static.py", line 54, in serve
    fullpath = os.path.join(document_root, newpath) 

This line indicates that an unsuccessful os.path.join is being attempted within django.views.static.

Set STATIC_ROOT in your project's settings.pyfile and you should be good.

Use StaticLiveServerTestCase instead may help

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!