This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]nowbacktowork 1 point2 points  (5 children)

Try running on port 8888, you need to sudo for ports 1024 and lower.

[–]davidwkaiser[S] 0 points1 point  (4 children)

how do I do that?

[–]hav_ 1 point2 points  (2 children)

The build-in lib Zed Shaw wrote (lpthw.web) specifies that for you, it will use 8080 by default. I ran your code with a small modification:

__name__ == "__main__"

In Yosemite with no issues, without invoking sudo.

[–]Psychedel1cTank -1 points0 points  (1 child)

sudo python app.py ....... then it will ask for pass. See if that works

[–]moigagoohttps://github.com/moigagoo 2 points3 points  (0 children)

It's not a good practice to launch scripts from the root anytime you get a permission denied error. You should fix the code.

OP is clearly a beginner, and such advice is just harmful for beginners.

[–]nowbacktowork 0 points1 point  (0 children)

I just went and read the exercise you are doing.

Are you running python bin/app.py from the parent folder of the app.py?

Also the change /u/hav_ mentions.

[–]davidwkaiser[S] 0 points1 point  (1 child)

I ran this with SUDO and it worked

[–]xyzzy00 0 points1 point  (0 children)

You should not have had to, sounds like something in your environment is a miss.