0

The following is the error code

    savePath = "E:\\Desktop\\output\\?.html"
    file = open(savePath, 'wb')

After running the error message is as follows:

Traceback (most recent call last):   File "Main.py", line 35, in
<module>
     crawler.testSaveContent("E:\\Desktop\\output\\?.html")   File 
"E:\Desktop\MyCrawler.py", line 77, in testSaveContent
     file = open(savePath, 'wb') OSError: [Errno 22] Invalid argument: 
'E:\\Desktop\\output\\?.html'

my python version is 3.6.3

stoneInt
  • 757
  • 1
  • 5
  • 10
  • 2
    Install linux. Or something else that isn't Windows. Alternatively, accept the fact that a file name can't contain a question mark. – Aran-Fey May 18 '18 at 10:16
  • 2
    Look [here](https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names). – zipa May 18 '18 at 10:17
  • @Aran-Fey thank you very much. I understand – stoneInt May 18 '18 at 10:32
  • @zipa The instructions are detailed and I understand. thank you very much for your help – stoneInt May 18 '18 at 10:33

0 Answers0