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 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


question

kamkoraz_193860 avatar image
kamkoraz_193860 asked ·

Got "No such file or directory" on my Astra bundle after running Ex02_Connect_to_Cassandra.py for the week 3 exercise

I know i am pretty far behind but i am determined to do this,

i have downloaded the secure connect file to my downloads

i have navigated to the crud-python folder within the week3-AppDev-crud folder

i have installed the cassandra driver

i have modified my db_connection.py and it looks like this below:


now trying to run exercise 2 to connect using

python Ex02_Connect_to_Cassandra.py 

i get an error message

what am i doing wrong?

workshop
1596215375808.png (16.6 KiB)
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. Thanks for reaching out.


I know i am pretty far behind but i am determined to do this,

No worries and that's awesome.

So far, looks like you've done everything correctly, but I noticed something in the images you attached (thank you for doing so). Looks like you are using gitpod, but you are referencing a local /Users/*/Downloads directory. That's not going to work. You need to upload the secure connect bundle into gitpod by selecting on the week3 folder, right click, choose upload. Then, change the path you provided in the db_connection.py to the path up in gitpod to reflect the location where you uploaded the file.

6 comments 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.

Thank you for assisting me, i have uploaded the secure-connect zip folder to the week 3 gitpod as shown below

and i tried changing the pathway to the secure connect bundle shown below as well:

i am still getting the error, i believe its from the pathway. can you point me in the right direction?

0 Likes 0 · ·
1596220284810.png (34.6 KiB)
1596220378317.png (18.0 KiB)

You are correct it is a path issue. You will need to provide the full path to your bundle. Go to where you uploaded your bundle in the terminal and execute command "pwd" to get the full working directory and provide that path to your variable.

0 Likes 0 · ·

so i executed 'pwd' and got the pathway to the downloaded file on gitpod and it is

should i also put the same pathway here in the code below highlighted in red?

even when i tried putting the pathway there i still had an error message below

i need your help again, am sorry

0 Likes 0 · ·
1596225337376.png (21.4 KiB)
1596225430066.png (22.9 KiB)
1596225494260.png (23.6 KiB)

So, the images are really small, but is looks like the keyspace name you are using is "Killrvideo" with a capital "K". If you created the DB per our instructions that should be a lower case "k", "killrvideo". Try that instead. BTW, per your last message, it IS connecting to the DB this time, but complaining about the keyspace name so this is a step in the right direction.


Oh and you shouldn't need to update that code. The environment variables should be enough.

0 Likes 0 · ·
kamkoraz_193860 avatar image kamkoraz_193860 David Jones-Gilardi ♦ ·

Thank you very much, it worked now and i am connected...it was the capital K in the 'killrvideo' that was the issue. thanks for your prompt assistance.

2 Likes 2 · ·
Show more comments