Closed ianmonat closed 7 years ago
You don't run templates; you run a Pyramid server which loads the templates through your project. This is summarized in the video: https://training.talkpython.fm/player/course/python-for-entrepreneurs-build-and-launch-your-online-business/lecture/50410
You're running the Community Edition, not Professional (although there is a 3-month free license through the course, look under your account) so there might be some differences between what you see in the video, PyCharm documentation, and my comment below.
First you need to edit your run configuration, and create a new run configuration.
Enter the appropriate values. Here's a screenshot of mine for a later chapter. You'll need to adjust the paths for Config file, Python interpreter, and Working directory.
Then click the run button, and your app should run.
Hi Steve,
Thanks for the help, I upgraded PyCharm (thanks for that, i didn't see the 3 mo free previously) and created a new run config, subbing in my own paths in the fields you specified.
I got a small improvement in that the browser didn't launch the .pt file as a download, but I got a run error instead that I can't quite interpret, see below:
C:\Users\imonat\blueyellowpy\Scripts\python.exe "C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\helpers\pycharm\pycharm_load_entry_point.py" C:\Users\imonat\Desktop\Python_Scripts\PyForEnt\python-for-entrepreneurs-course-demos\2-web-starter\blue_yellow_app\development.ini
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\helpers\pycharm\pycharm_load_entry_point.py", line 12, in
Process finished with exit code 1
This sounds like you did not run the setup.py task to install the app. You can do this by either:
development.ini
, and select Run setup.py task...
, and enter develop
.development.ini
is contained, and enter python setup.py develop
. In the latest version of PyCharm, the terminal session activates the virtual environment automatically, so it should find your Python. If not, then you can run the same command as /path/to/my/python setup.py develop
.Hi Steve, I figured out what I was doing wrong and got the file from the Designable Web lesson (aka the Cache busting lesson) to run as expected. I see what I was doing wrong now, thanks so much for the help.
Hi Michael,
I'm following along in the Cache busting lesson and I'm getting some unexpected behavior from PyCharm when I run index.pt.
In the video, you run index.pt in PyCharm and a link appears in a terminal, and when you click the link, a browser opens, displaying the minimally-styled webpage.
When I try running the file (on Windows with the free version of PyCharm), index.pt pops up as a 'Save As' download in my default browser (Chrome). (see img below)
I tried opening it after I downloaded it but Windows was confused as to which application to use. I saw your tip in the video to hit Shift + F10, but no action happens when I do that.
Any help is appreciated, thanks!