Python WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect:

前端 未结 6 517
难免孤独
难免孤独 2020-12-30 22:07

I am new to programming, this is actually my first work assignment with coding. my code below is throwing an error:

WindowsError: [Error 123] The filename,          


        
6条回答
  •  春和景丽
    2020-12-30 22:28

    As it solved the problem, I put it as an answer.

    Don't use single and double quotes, especially when you define a raw string with r in front of it.

    The correct call is then

    path = r"C:\Apps\CorVu\DATA\Reports\AlliD\Monthly Commission Reports\Output\pdcom1"
    

    or

    path = r'C:\Apps\CorVu\DATA\Reports\AlliD\Monthly Commission Reports\Output\pdcom1'
    

提交回复
热议问题