Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 7 Materials and Homework.

Registrations still open!


question

danbk99_179482 avatar image
danbk99_179482 asked ·

Getting "404 not found" when running getting_started_with_astra.py

In Week 4 of the workshop. When running the initial Python file , when I click on the 'open browser ' button after running the initial 'Getting-started ...'.py file , I get the 'not found ' error.

You are given a url https://5000-your id-your region that you are supposed to put in somewhere (this is given in between the 'open gitpd'

button and a picture o the gitpod screen. Not sure why its' been put there.) Am i supposed to put this in the browswer address window ?

( I did and get a 'websockets blocked' message.)

Am I supposed to hard code this into the .py file? .. Like where "host=0.0.." It's not clear ..

IN any case when I get to open browser I get not found.

workshop
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

David Jones-Gilardi avatar image
David Jones-Gilardi answered ·

Hi there @danbk99_179482. I think you are referring to somewhere around section 2.2.2 of the python back-end exercise here -> https://github.com/DataStax-Academy/cassandra-workshop-series/tree/master/week4-AppDev-api#222-run-in-gitpod within the "Starting the Flask application procedure" topic. If that is the case please notice the following image from that section:

If you attempt to navigate directly to the generated URL you will see the 404 and that is expected as per the instructions. Admittedly, this just looks like a regular error and could be a little clearer. The key here is that your back-end is up and running and you should see a message generated from the terminal where you ran "python getting_started_with_astra.py" any time you make a request to that URL.

Once you reach this point your back-end is setup. Move to the front-end UI section lower down on the page here -> https://github.com/DataStax-Academy/cassandra-workshop-series/tree/master/week4-AppDev-api#32-run-in-gitpod. This is where you use the URL you generated from the earlier section "https://5000-your id-your region".

Follow the instructions in this section to save your URL along with "/api" to a local .env file. This will create the needed reference to your back-end API.


1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks , appreciated.

[Follow up question posted in #7152]

1 Like 1 · ·