@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.
@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.
If this doesnāt work, try the step below.
I am able to paste using shift+insert
on Chrome/ Windows.
I hope this helps!
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.
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.
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!
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!
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 experienced the same, yesterday and this morning.
what i did: