World Cup Database - Build a World Cup Database - stuck because DB "does not exist" - thanks so much for your help

Tell us what’s happening:
Describe your issue in detail here.
Hi there,

like others before me, I am stuck with the worldcup project because the worldcup database supposedly does not exist:
image

This issue only appears once I added executable permissions to the insert_data.sh and queries.sh file.

Here is what I tried:

  • Played around with permissions for the scripts , trying almost all combinations between 500 and 777. As soon as the script have 500 as a minimum, the db does not exist according to the tests.
  • I was connected to the worldcup database when running the tests.
  • I did a soft reset
  • I did a hard reset
  • I dropped the database and recreated it from the dumpfile
  • I deleted the entire project and started from scratch, the issue persists
  • I scanned my insert_data.sh and queries.sh for any errors, could spot none, but would be supergrateful if someone with a fresh eye could have a look. This is driving me crazy :smiling_face_with_tear:

Your project link(s)

solution: Mod edit: deleted pre user request.

Your browser information:

User Agent is: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: World Cup Database - Build a World Cup Database

Link to the challenge:

After some fiddling around, it looks like the issue is at the very end of the insert-data.sh - script, which, weirdly enough, inserts all the data correctly without throwing errors.

echo $($PSQL "INSERT INTO games(year, round, winner_id, opponent_id, winner_goals, opponent_goals) VALUES($YEAR,'$ROUND',$WINNER_ID,$OPPONENT_ID,$WINNER_GOALS,$OPPONENT_GOALS)")

Whenever I comment it out, the database does not exist - error disappears.
However, the line itselfs does not throw any errors and inserts the data as desired. Any ideas where I could look? Thanks a lot?

1 Like

Well, now it works, with the very same line that seemed to trigger the error.

I got the same error a few days ago then hit then run button a few more times and it started working.

I don’t have any error and I can’t the test either.
It worked one time after I’ve reseted the task, but after it no more.
Any help would be greatly appreciated

Check out my post here: Relational Database Courses - Persistent Issues
I managed the same issue eventually and complete the project.

I did follow your suggestion, but it doesn’t pass the test

I don’t understand how the queries.sh passed and the insert_data.sh did not.
I really very tired with this task.

Can you share the full code of your insert_data.sh file please?
Make sure you spoiler it though so you’re not giving hints to anyone who hasn’t yet completed it.

I switched to Firefox and did the course there. After, I’ve returned to curriculum main main page and put the repo URL, but it is saying that I’ve not completed yet. :rofl:

Now, I can not star the course again. It brings me to CodeAlly’s DASHBOARD.