#bookbrainz

/

      • nikhil_rana joined the channel
      • nikhil_rana has quit
      • Siddhart1o1 joined the channel
      • Siddhart1o1
        monkey Hi. I fixed the author and Disambiguation in this issue https://tickets.metabrainz.org/browse/BB-703. I also added loadGender middelware in series get request ```router.get('/:bbid', middleware.loadEntityRelationships, middleware.loadSeriesItems,middleware.loadGenders, (req, res) => {
      •  _setSeriesTitle(res);
      • BrainzBot
        BB-703: Series of authors are not displayed correctly
      • Siddhart1o1
         entityRoutes.displayEntity(req, res);
      • });``` . can you help me with next steps?
      • pbryan
        Hi Siddhart1o1, monkey's probably asleep right now.
      • Do you have a PR that he can review?
      • Siddhart1o1
        yes
      • monkey told me to make changes. But I have some confusion in Genders Field
      • pbryan
        OK, I'm not familiar with the code base, so I'm afraid I won't be of much help.
      • I do see a bunch of ESlint errors though that are probably worth addressing in the meantime.
      • s/errors/warnings/
      • Actually both errors and warnings.
      • Siddhart1o1
        yes these will be fixed. Do you know any docs from which i can get understanding of CodeBase?
      • Siddhart1o1 has quit
      • Siddhart1o1 joined the channel
      • monkey
        Siddhart1o1: I'll review the PR on Monday :)
      • In the meantime, if you were looking for docs, we have: https://bookbrainz-dev-docs.readthedocs.io/en/l... with some description of the schema and other moving parts of the codebase
      • Siddhart1o1 has quit
      • Siddhart1o1 joined the channel
      • Siddhart1o1
        monkey Thanks.  Actually I Have not made new PR I wanted to some help in gender Field rest I have done. I added ```loadGenders``` middleware as you said, but I am not able to understand further.
      • I will wait for your further instruction. Meanwhile I will explore codebase, different projects and bugs. Thanks.
      • Or you can suggest some resources for the framework we are using, or any library. which will help me understand the codebase
      • kellnerd joined the channel
      • Siddhart1o1 has quit
      • Siddhart1o1 joined the channel
      • kellnerd has quit
      • Himanshu joined the channel
      • Siddhart1o1 has quit
      • Himanshu has quit
      • Deogee joined the channel
      • Deogee
        Hello guys. I am interested in contributing to bookbrainz. I ran into an issue while setting up the project. I went through the chat backlog and couldnt find a solution.
      • The issue is that i'm getting the error "/usr/bin/env: ‘bash\r’: No such file or directory" when i run  "/usr/bin/env: ‘bash\r’: No such file or directory"
      • i'm using wsl on windows
      • sorry i meant when i run ./scripts/database-init-docker.sh
      • If anyone could save me some time i'll appreiate
      • pbryan
        Hi Deogee. Welcome!
      • What OS are you using?
      • Deogee
        i'm using wsl on windows
      • pbryan
        Heh, yeah, just saw you said that. Sorry. Slowpoke here.
      • OK, so are you in a bash shell when running the script?
      • Deogee
        haha no worries
      • yes i am
      • pbryan
        OK, standby...
      • Deogee
        Alright
      • pbryan
        So, you're trying to run the `./scripts/database-init-docker.sh` script?
      • Deogee
         yes , i also tried navigating to th bookbrainz-site folder and running yarn install
      • But i get the same error
      • pbryan
        How are you trying to run the script?
      • Deogee
        i went inside the file and manually type the script
      • The first one is docker-compose up
      • Thats where i get the error
      • after running docker-compose up
      • pbryan
        Oh, definitely do not try to type each line of the script, if that's what you mean.
      • Deogee
        sorry i did'nt clarify that
      • Rohan11 joined the channel
      • pbryan
        You should just let bash execute the script by typing ./scripts/database-init-docker.sh.
      • Rohan11 has quit
      • Deogee
         i could'nt run this "`./scripts/database-init-docker.sh`" on wsl
      • pbryan
        What happens when you try that?
      • Oh, and exclude the `backticks`.
      • Deogee
        i still get "/usr/bin/env: ‘bash\r’: No such file or directory"
      • RohanSasne joined the channel
      • pbryan
        Hmm.
      • What happens if you type /usr/bin/env in the bash shell?
      • RohanSasne
        Hey Rohan this side, I would love to contribute to BookBrainz this summer :) currently going through the documentation for the project and will come with a draft proposal really soon :))
      • pbryan
        Hi RohanSasne. Welcome!
      • Deogee
        i'm trying to send a file of what i get
      • but its not working
      • its basically a bunch of stuffs
      • pbryan
        You can't send files over IRC. You can paste as a gist in GitHub?
      • Deogee
        SHELL=/bin/bash
      • NVM_INC=/home/deogee/.nvm/versions/node/v18.14.2/include/node
      • WSL2_GUI_APPS_ENABLED=1
      • WSL_DISTRO_NAME=Ubuntu
      • WT_SESSION=ea072174-e9d9-4be9-9dff-303c0c1cb9cd
      • NAME=DESKTOP-GLQ2AJ4
      • PWD=/mnt/c/Users/ahmad/Desktop/Projects/Web/github/bookbrainz-site
      • LOGNAME=deogee
      • HOME=/home/deogee
      • LANG=C.UTF-8
      • These are the first few lines
      • pbryan
        OK, that's good. That tells us that `env` is there.
      • And if you type `bash` in the command line? (It should seem like it's does nothing with no error.)
      • Deogee
        No error.. But nothings logged also
      • pbryan
        Right. OK.
      • Hmm.
      • So, let's try typing manually: /usr/bin/env bash
      • Seems to do nothing, no error?
      • Deogee
        Exactly. No error, nothing logged
      • pbryan
        OK, did you modify this script in some way?
      • I think it's the \r at the end that's the problem.
      • I suspect you may have edited the file with an editor in Windows, and it modified the script to add CR to the end of lines.
      • Deogee
        I don't think i did. But just incase i'll clone the repo and try again
      • pbryan
        OK.
      • Ah.
      • Here's another clue.
      • It seems that git will add CRs to lines.
      • In Windows.
      • RohanSasne has quit
      • RohanSasne joined the channel
      • Deogee
        i'm checking it out
      • By the way i ran other scripts in the same folder and i get the same error
      • cloning...
      • pbryan
        Seems that you'll need to set core.autocrlf to false and clone.
      • This will be worth noting in the documentation.
      • Deogee
        let me try so
      • RohanSasne has quit
      • It'll definatly  help in the documentation
      • ''''''''''''''''''''''
      • oops that was a mistak
      • pbryan
        OK, for checking out the files only, core.autocrlf false is safe, but for working on the project, the safest is core.autocrlf input.
      • This way if any files are committed by you, any CRs will be removed.
      • Deogee
         i did core.autocrlf false and now i'm getting  '-bash: /scripts: No such file or directory'
      • even though i can clealy see the file
      • pbryan
        Did you put dot in front of scripts? ./scripts/...
      • Deogee
        i did
      • and i see the folder when i type ls
      • pbryan
        So exact command you're entering is?
      • Deogee
        ./scripts/database-init-docker.sh
      • pbryan
        Hmm.
      • How did you set core.autocrlf false?
      • Deogee
        i typed "git config --global core.safecrlf false" on the terminal before cloning
      • pbryan
        OK.
      • Deogee
        i'll delete and try cloning again
      • pbryan
        Just for fun, if it happens again, run "bash" inside of the command line before running the "./scripts/database-init-docker.sh" command.
      • Deogee
        Alright
      • Same error(/usr/bin/env: ‘bash\r’: No such file or directory) even after typing "bash" before running the command
      • pbryan
        That error tells me that the clone is still somehow pulling CRs.
      • (Inserting CRs.)
      • Oh, you set core.safecrlf?
      • core.safecrlf != core.autocrlf
      • Deogee
        i did these
      • git config --global core.autocrlf true
      • git config --global core.safecrlf false
      • i ran the two commands before cloning
      • pbryan
        core.autocrlf true is the opposite of what we want here.
      • I would suggest setting it to input.
      • Deogee
        what about core.safecrif
      • pbryan
        Geez, the git docs aren't very clear. Reading...
      • Deogee
        haha i'm going through them too
      • pbryan
        OK.
      • So...
      • Things are recommending that for Windows, you should checkout with CRLF, but we don't want that here because we're going to run these in docker, which is a Linux environment, which rejects the CRs.