简体   繁体   English

文件.egg不存在

[英]file .egg doesn't exist

I am trying execute a python script which uses PANDA3D library. 我正在尝试执行一个使用PANDA3D库的python脚本。

I have this error : ERROR: the path '\\c\\virtual-vision-simulator_master\\media\\scenes\\office_floor\\skybox.egg' doesn't exist' 我有此错误: ERROR: the path '\\c\\virtual-vision-simulator_master\\media\\scenes\\office_floor\\skybox.egg' doesn't exist'

I have checked and the file exist in this path. 我已经检查过,并且该文件存在于此路径中。

Using '\\' usually mean an escape char, for example '\\n' mean next line. 使用'\\'通常表示转义字符,例如'\\ n'表示下一行。 Try to replace the '\\' values by '/'. 尝试将“ \\”值替换为“ /”。

'/c/virtual-vision-simulator_master/media/scenes/office_floor/skybox.egg'

Panda3D uses UNIX-style paths, even on Windows. 即使在Windows上,Panda3D也使用UNIX样式的路径。 This means that you have to use forward slashes instead of backslashes. 这意味着您必须使用正斜杠而不是反斜杠。 So, you should use the following path instead: 因此,您应该改用以下路径:

/c/virtual-vision-simulator_master/media/scenes/office_floor/skybox.egg

On top of that, backslashes have a special interpretation in Python (as in many other languages), and if you do have to use backslashes in a string, you have to either put r in front of the string (as in r"a\\b" ) or you have to use double backslashes (as in "a\\\\b" ). 最重要的是,反斜杠在Python中有特殊的解释(与其他许多语言一样),如果必须在字符串中使用反斜杠,则必须将r放在字符串前面(如r"a\\b" ),或者您必须使用双反斜杠(例如"a\\\\b" )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM