Relational Database Courses - Persistent Issues

For the last few days I’ve seen multiple reports of people experiencing issues with these courses, particularly concerning the running of the CodeRoad tests and terminal/connection problems.

I’ve been getting all kinds of weird results myself when working on the World Cup Database course…

Firstly, the tests throw up some kind of ‘before all hook’ error message and fail to recognise that my database exists, even though I can connect to it and view its contents (and have passed all corresponding tests previously).

Secondly, when I try to seed the database with my bash script, it appears to do so successfully, in that I can then view all of the rows in my tables (though the tests refuse to acknowledge this too).

I also get weird terminal behaviour similar to this screenshot. What are all these tildes for? That’s what happens when I do a ‘SELECT * …’ command on my games table.

I am not particularly aware of why there are issues with connections/tests in this section. I do just know:

The tildes are showing that those lines are not empty whitespace - they are not a part of the file/output. Typically, you see these with applications like less, and are configurable:

-~ or --tilde
Normally lines after end of file are displayed as a single
tilde (~). This option causes lines after end of file to
be displayed as blank lines.
less(1) - Linux manual page

Hope that helps clear up your aside question.

Thanks for the response @Sky020
So, this is one of the persistent issues I’m experiencing (error message below).
Sometimes, if I DROP DATABASE, save everything and reload, it starts to work again and I pass all tests. Other times it just doesn’t play ball. Another persistent issue is that the psql terminal crashes on me quite a bit, churning out tildes (as mentioned above) and then refusing to accept further input.

Another error.

I have completed all code for this project now and have saved the relevant files into a git repo.
I cannot for the life of me get the tests to pass on CodeRoad though, as I keep getting a ‘before all hook’ error message (as above).
So I can’t complete the project on CodeRoad. Everything else working as expected.
My database exists and the insert_data.sh and queries.sh files behave exactly as expected and the output is exactly as specified.
I have deleted the entire project on CodeAlly and started afresh twice but no dice.

When I submit my git repo link, FCC tells me I need to complete the project first.

Any ideas?

I have finally successfully completed this project!
My solution?

  1. Delete the container in CodeAlly
  2. Restart the project in FCC
  3. Rebuild the database structure from scratch (without using dump file)
  4. Paste in my previously written code for the insert_data.sh and queries.sh files
  5. Give them executable permissions and run them both
  6. Run the tests and get 100% Complete message (finally!)
  7. Submit git repo link to FCC
3 Likes

How do you delete container? Last step wont complete even after getting al lthe results

First, make sure you have saved a local backup of your files though (i.e. insert_data.sh and queries.sh).

Log in to CodeAlly and click on the Cloud IDE tab.
You should see a list of all of your projects and you can delete the one which is causing you issues.
Then, when you’ve deleted the project container, you can go back to FCC and start the project afresh.
Rebuild the database structure manually and then recreate your files from your backup and try running the tests.
This should hopefully avoid the ‘before all hook’ error which prevents the project completing successfully on CodeRoad.

Thank you, did that but still stick in the same problem.

Here are my codes if someone can check it out

Results from querie.sh
Total number of goals in all games from winning teams:
68

Total number of goals in all games from both teams combined:
90

Average number of goals in all games from the winning teams:
2.1250000000000000

Average number of goals in all games from the winning teams rounded to two decimal places:
2.13

Average number of goals in all games from both teams:
2.81250000000000000000

Most goals scored in a single game by one team:
7

Number of games where the winning team scored more than two goals:
6

Winner of the 2018 tournament team name:
France

List of teams who played in the 2014 ‘Eighth-Final’ round:
Algeria
Argentina
Belgium
Brazil
Chile
Colombia
Costa Rica
France
Germany
Greece
Mexico
Netherlands
Nigeria
Switzerland
United States
Uruguay

List of unique winning team names in the whole data set:
Argentina
Belgium
Brazil
Colombia
Costa Rica
Croatia
England
France
Germany
Netherlands
Russia
Sweden
Uruguay

Year and team name of all the champions:
2014|Germany
2018|France

List of teams that start with ‘Co’:
Colombia
Costa Rica

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.