Running the Relational Database Curriculum in your Browser

@moT01 This was the solution, the problem is just looking for it to run with input only.

I misinterpreted what exactly it was asking for.

Hi. Iā€™ve run into a problem with the five-programs part of this course. Iā€™m meant to create bingo.sh which I have, but the CodeRoad isnā€™t recognizing it. Iā€™ve made sure Iā€™m in the right folder and the name is correct, but Iā€™ve might have missed something? Iā€™ve tried removing the file and re-creating it as well as change browser and tried it again, but Iā€™m kind of stuck.

Mananged to solve it by reading moT01ā€™s earlier post.

Hereā€™s what I would try @equillibrium - Click the reset button - after itā€™s done resetting, close the terminal by typing exit into it or using the trash can icon at the top right of it - open a new terminal and do the step again.

I thought the reset button would put me back on step 1, but this worked wonderfully. I had to exit the terminal afterwords, like they wrote.

1 Like

Solution to the clipboard error:

1. Allow Clipboard on Chrome for freecodecamp.org

clipboard

If this doesnā€™t work, try the step below.

2. Use alternate keys to paste.

I am able to paste using shift+insert on Chrome/ Windows.

I hope this helps! :slight_smile:

4 Likes

Iā€™ve been struggling for 2 days now to pass the project tests of the number guessing game. The script worked fine when I ran it, but most of the ā€œprint Xā€ tests didnā€™t pass. I tried switching my code around, even reset the project and started again from scratch.

I rewrote my code and it appears to be an issue with read within a while loop. I have to add ā€œ< /dev/ttyā€ after ā€œread GUESSā€ for it to work on the terminal, but then I get a ā€œTest Runner Failedā€ error when I try to run the tests. Removing the ā€œ< /dev/ttyā€ makes the tests run again (but still not all of them pass), but running it on the terminal causes an endless loop (loop never stops to wait for user input).

I honestly donā€™t know what else to do and need a second pair of more experience eyes on this. Hereā€™s the repo with my files: GitHub - NickPartalis/freeCodeCamp-number_guessing_game

Hi again!

I was finishing the salon appointment scheduler but on this condition it never appears as done but all the primary keys are correct, am I getting it wrong?




Hey @nickpartalis, looks like youā€™ve been working hard on this one. It took me quite a bit of playing with it, but I was able to get it working. First, remove the < /dev/tty. Pretty neat find and, although seemed to be working, I think itā€™s overriding the input the test is trying to give - so just remove that. After that, it seemed like it was working as expected for new users, but returning users got stuck in that loop. I sort of know what was happening, but didnā€™t get to the why. The read GUESS was getting empty input over and over again. Anyway, the fix was to adjust the MAIN_MENU to use something that was more familiar to me. I changed the

echo $USER_QUERY_RESULT | sed 's/|/ | /g' | { read ID BAR...

to

echo $USER_QUERY_RESULT | while IFS="|" read ID USER...

Hopefully, thatā€™s enough to help you get it finished. Let me know if you still canā€™t finish and Iā€™ll see if I can help some more.

1 Like

Hey @andrescerchia, I think there may be a typo - the appointments table has an appoinment_id column (missing a t in the middle). I would try and change that so the t isnā€™t missing. If that doesnā€™t fix the problem, let us know.

1 Like

I canā€™t seem to log into postgres using the psql --username=freecodecamp dbname=postgres

returns this error: ā€œpsql: error: connection to server on socket ā€œ/var/run/postgresql/.s.PGSQL.5432ā€ failed: No such file or directory
Is the server running locally and accepting connections on that socket?ā€
I recently installed postgres on my computer, if that is the issue, what can I do to finish the curriculum?

Hi, @adamkartak thanks for reaching out. Looks like this is a bash scripting course and might not need Postgres connection. But if this is a DB-related course, a solution would be to exit the terminal using the command exit. Then, relaunch the terminal:

After that type in exactly: psql --username=freecodecamp --dbname=postgres.

Below is my screenshot for the Celestial Bodies exercise.

Thank you @moT01 for your suggestion, it helped a lot!

I played a bit more with the code and if I had to guess, Iā€™d say the issue was caused from piping the USER_QUERY_RESULT onto while IFS="|" read ..., since the read runs on a subshell and within a while loop, and maybe that caused problems with the code and the tests? Anyway, I replaced
echo $USER_QUERY_RESULT | while IFS="|" read GAMES_PLAYED BEST_GAME
with
IFS="|" read GAMES_PLAYED BEST_GAME <<< $USER_QUERY_RESULT
and it worked like a charm afterwards. Also removed the functions, since they were no longer needed.

Thanks again for the help!

1 Like

Hello, i cant get to pass this step. Already tried the reset buttom. closing a reopening the browserā€¦

Are the tests running automatically @Tepz? Try exiting the terminal and opening a new one after that reset.

Try using the reset button in CodeRoad @adamkartak. That should be enough (hopefully), but you may need to close and open the terminal after that.

Thanks for the fast response. Closing the terminal and reopening after a reset did the job!

1 Like

This worked thank you so much!

I have the same issue. did you find any solution?

I found a solution. it seems there was something wrong with my user being superuser. so I followed instruction in this pages

which means basically this two commands

`sudo -u postgres createuser --superuser $USER`
`sudo -u postgres createdb $USER`

I got this weird screen

i experienced the same, yesterday and this morning.
what i did:

  1. restart my laptop, then it was okay.
  2. a.close the browser.
    b.Open task manager and looked up and select the browser ( I use brave)
    c.ā€˜end tasksā€™ all broswer running in the background.
    d.re-open the browser and retry to start the project.
    e. just refesh if stuck on loading the ā€˜virtual machineā€™ stage.