Jump to content


Photo

Chapter 7 Simple_Httpd Server Error


  • Please log in to reply
2 replies to this topic

#1 Jschaefer04

Jschaefer04

    New Member

  • Members
  • Pip
  • 6 posts

Posted 05 March 2013 - 12:50 AM

Hello,

I'm fairly new to Python programming and I'm having a slight problem with the web server in Chapter 7. I'm running a Macbook Pro with OS 10.7(Lion). I am also completely new to the mac terminal so this might be a simple problem and I'm just misunderstanding the error message. When I try to do the python3 simple_httpd.py step I get this error message: /Library/Frameworks/Python.framework/versions/3.2/Python.app/Contents/MacOS/Python: Can't open 'simple_httpd.py' no such file or directory. . I have checked and confirmed that this path is not my working directory in terminal and that the folder I am in has the simple_httpd/py script. So, what I am having trouble with is why is the terminal looking for the file in someplace other than the directory I'm working in? Any help would be greatly appreciated. I have also attached a screenshot of my session in case I've missed anything important. Thank you.Python Error.jpg

#2 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 05 March 2013 - 01:53 AM

Please recheck the error message. You have a typo. You should use "python3 simplehttpd.py". You typed "simplehtppd.py", which can't be found. That's why Python is looking for the file in its system folders, as it can't find it in your current working directory.

--Paul.

#3 Jschaefer04

Jschaefer04

    New Member

  • Members
  • Pip
  • 6 posts

Posted 05 March 2013 - 07:09 PM

[quote name='paulbarry' timestamp='1362477212' post='111995']
Please recheck the error message. You have a typo. You should use "python3 simplehttpd.py". You typed "simplehtppd.py", which can't be found. That's why Python is looking for the file in its system folders, as it can't find it in your current working directory.

--Paul.

Thanks Paul! Problem solved. Didn't see the typo.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users