#metabrainz

/

      • pristine__
      • How do I update the docker engine?
      • > How do I update the docker engine?
      • Docker engine and docker compose are different things :)
      • Once the downloads are finish let me know, we will set up labs then. Also, you can contribute to listenbrainz-server as well if you wish to since you have it on your machine now
      • sarthak_jain
        Yes sure.
      • pristine__
        It is more organized and have plenty of open tickets. If you want I can provide the link of ticktes :)
      • sarthak_jain
        Ohh
      • I'll try
      • pristine__ goes to make a ticket for sarthak. May take some time :)
      • Yaa great ;)
      • Its done.
      • :)
      • pristine__
        Now clone listenbrainz-labs
      • sarthak_jain
        Okay
      • pristine__
      • sarthak_jain
        Inside the listenbrainz-server or seperately?
      • pristine__
        Inside /home..... i.e. separately
      • sarthak_jain
        Yes its done
      • pristine__
        Run `sudo ./develop.sh build`
      • sarthak_jain
        Inside labs/
      • pristine__
        Yes
      • sarthak_jain
        ?
      • pristine__
        And if you want to contribute to server also, follow the remaining steps of read the docs whenever you wish to.
      • sarthak_jain
        Okay
      • Downloads have started in the terminal
      • Sophist-UK joined the channel
      • ephemer0l_ joined the channel
      • D4RK-PH0ENiX has quit
      • NobodyRocks joined the channel
      • ephemer0l_ is now known as ephemer0l
      • NobodyRocks is now known as SomebodySocks
      • SomebodySocks is now known as NomebodyNocks
      • NomebodyNocks
        Hi, I am encountering an issue when submitting AcoustIDs for which I could not find any existing threads or issues:
      • When clicking submit in picard, I get the error "E: 12:54:36,545 /usr/lib/python3.8/site-packages/picard/acoustid/manager.__fingerprint_submission_finished:98: AcoustID: submission failed with error 'Error transferring http://api.acoustid.org:80/v2/submit - server replied: INTERNAL SERVER ERROR': internal error"
      • outsidecontext
        NomebodyNocks: Please have a look at Help > Show Error/Debug Log, there should be details about the failed request.
      • If you can show the output there I can probably tell if this is something that could be fixed in Picard (e.g. wrong data getting submitted) or if it is something that should be reported for the AcoustId sserver on https://github.com/acoustid/acoustid-server/issues
      • NomebodyNocks
        The output is:
      • E: 12:54:36,544 /usr/lib/python3.8/site-packages/picard/webservice/__init__._handle_reply:386: Network request error for http://api.acoustid.org:80/v2/submit: Error transferring http://api.acoustid.org:80/v2/submit - server replied: INTERNAL SERVER ERROR (QT code 401, HTTP code 500)E: 12:54:36,545
      • /usr/lib/python3.8/site-packages/picard/acoustid/manager.__fingerprint_submission_finished:98: AcoustID: submission failed with error 'Error transferring http://api.acoustid.org:80/v2/submit - server replied: INTERNAL SERVER ERROR': internal error
      • I cannot find additional details in the debug log
      • would there be any advantage if I checked the exact submission through wireshark or similar?
      • outsidecontext
        NomebodyNocks: You should start Picard with the --debug flag or change the Verbosity in the log window to debug, then try again, then you should see the request data
      • I'm AFK, but if you write here I will look at it later
      • pristine__
        sarthak_jain: if you wish to contribute to labs here is the ticket
      • BrainzBot
        LB-474: ListenBrainz-Labs: Write tests for stats module
      • pristine__
        Please assign the ticket to yourself.
      • NomebodyNocks
        outsidecontext ah, thanks! here is the dubug log:
      • D: 13:08:25,636 /usr/lib/python3.8/site-packages/picard/ui/itemviews.dropMimeData:569: Drop target = <Track 150ced6c-1632-4a04-a184-e4c3839b48d4 'Long Elevator'>D: 13:08:25,637 /usr/lib/python3.8/site-packages/picard/ui/itemviews.drop_urls:530: Dropped the URL: 'file:///mnt/media/music/library/Toby Fox/UNDERTALE Soundtrack/70 - Long
      • Elevator.flac'D: 13:08:25,638 /usr/lib/python3.8/site-packages/picard/file.move:508: Moving <FLACFile '70 - Long Elevator.flac'> from <Cluster 'Unclustered Files'> to <Track 150ced6c-1632-4a04-a184-e4c3839b48d4 'Long Elevator'>D: 13:08:27,456 /usr/lib/python3.8/site-packages/picard/acoustid/manager.submit:79: AcoustID: submitting ...D: 13:08:27,457
      • /usr/lib/python3.8/site-packages/picard/webservice/__init__.post:461: POST-DATA 'user=VnELKKxLKk&fingerprint.0=AQAAjEkySemSJOiFy_BxHMRB4TgOHwcBGzwO-Dh4gIdxHD6OA7BxHPBxAziMH_BxHDiMA_BxADbwAz6OA4dxHD6OA4dxHIePA7BxAMbBAweF4_Bx8MBB4Tjg4wZwGD_g4zhwGD8A_zgAe-DB8YcO__ihI89xUDh3FFcmIfku5AAjtVXKmrOUM9sKYc22ypqtlBXaKmWVskJbpazZVilrzlLWCmXNtkJZs5WyQlulrFBCeYB
      • AMxYRg6xhzAgM&duration.0=20&mbid.0=150ced6c-1632-4a04-a184-e4c3839b48d4&client=v8pQ6oyB&clientversion=2.2.3.final0&format=json'D: 13:08:27,458 /usr/lib/python3.8/site-packages/picard/webservice/ratecontrol.get_delay_to_next_request:115: ('api.acoustid.org', 80): Last request was 20002 ms ago, starting another oneD: 13:08:27,458
      • /usr/lib/python3.8/site-packages/picard/webservice/ratecontrol.increment_requests:135: ('api.acoustid.org', 80): Incrementing requests to: 1D: 13:08:27,582 /usr/lib/python3.8/site-packages/picard/webservice/ratecontrol.decrement_requests:143: ('api.acoustid.org', 80): Decrementing requests to: 0E: 13:08:27,583
      • /usr/lib/python3.8/site-packages/picard/webservice/__init__._handle_reply:386: Network request error for http://api.acoustid.org:80/v2/submit: Error transferring http://api.acoustid.org:80/v2/submit - server replied: INTERNAL SERVER ERROR (QT code 401, HTTP code 500)E: 13:08:27,583
      • /usr/lib/python3.8/site-packages/picard/acoustid/manager.__fingerprint_submission_finished:98: AcoustID: submission failed with error 'Error transferring http://api.acoustid.org:80/v2/submit - server replied: INTERNAL SERVER ERROR': internal errorD: 13:08:27,583 /usr/lib/python3.8/site-packages/picard/webservice/ratecontrol._slow_down:185:
      • ('api.acoustid.org', 80): slowdown; delay: 333ms -> 1000ms; ssthresh: 51; cws: 1.000
      • not familiar with IRC, sorry for the unformatted log output
      • pristine__
        NomebodyNocks: I think it would be good to use gist.github.com
      • for pasting logs
      • NomebodyNocks
        oh, true! my bad
      • pristine__
        np :)
      • NomebodyNocks
      • sarthak_jain
        pristine__ how do I assign the ticket ?
      • D4RK-PH0ENiX joined the channel
      • pristine__
        open the link, you will see assign option in right side of the page
      • for that you should be logged in
      • so make an account on jeera
      • assign the ticket only if you wish to work on it :)
      • sarthak_jain
        Yes, I will make an account on JIRA
      • pristine__
        sarthak_jain: Labs is a part of Listenbrainz project so they are linked. We have recently started writing tests for labs so it maybe possible that you don't have much to explore. I will recommend reading and understanding tests in Listenbrainz-server to figure out how it actually works, the flow etc
      • There are multiple tests folders inside lb-server directory which you can refer to
      • sarthak_jain
        Yaaa
      • pristine__
        Also, since this is your first task, you may have to spend a week in just reading and understanding the codebase which is an important part of development.
      • you can run tests using `sudo ./test.sh`
      • there will be few downloads the first time you run the command, so after you write any test you can run the command to know how the tests are working.
      • sarthak_jain
        I need need to write tests for stats ?
      • pristine__
        did you open the links in the tickte.
      • Stats is a module in labs
      • sarthak_jain
        Yes
      • pristine__
        so you should write tests for scripts in the stats modul
      • sarthak_jain
        I should begin with init?
      • pristine__
        you can start with __init__.py since it has few functions to test
      • yes
      • I will recommend you to read the codebase, read how tests are written (in python) google your doubts or post them here and then start writing tests.
      • sarthak_jain
        Yes sure
      • pristine__
        You can filter ListenBrainz issues on jeera if you want to work on someother ticket
      • I am off for today
      • sarthak_jain
        Are there any tests already written which I can refer
      • ?
      • pristine__
        in case you have any doubt, post it here on the main channel, i will surely reply tomorrow.
      • > Are there any tests already written which I can refer
      • there is a link in the ticket
      • this
      • As i said we have just started writing tests for labs, you can refer to server to understand the flow. Let me give you some links
      • The codebase is all yours, spend some time reading it. See you tomorrow (post doubts here and just mention me) :)
      • sarthak_jain
        Great. I guess this should get me started.
      • Thanks :)
      • Have a great evening
      • ephemer0l has quit
      • NomebodyNocks has quit
      • sbvkrishna has quit
      • BrainzGit
        [bookbrainz-site] ruinername opened pull request #334 (master…font-awesome-migration): BB-369 - FontAwesome migration https://github.com/bookbrainz/bookbrainz-site/p...
      • BrainzBot
      • ephemer0l joined the channel
      • sarthak_jain
      • I wrote a sample test case for a function
      • If you could check and tell
      • The test case is for a function in stats module
      • pristine__
        sarthak_jain: your reviews on your code you need to make a pull request
      • That will require lil knowledge of git.
      • Lemme share a link
      • This is a really good resource
      • > If you could check and tell
      • You should run ./test.sh to validate your tests :)
      • NomebodyNocks joined the channel
      • NomebodyNocks has quit
      • sbvkrishna joined the channel
      • sarthak_jain
        pristine__ I couldnt make much sense
      • Did you go through the test?
      • Does it look fine?
      • pristine__
        sarthak_jain: what does not makes sense to you?
      • Did you run ./test.sh to validate your code
      • sarthak_jain
        where do I need to create the file test.sh?
      • pristine__
        Code is generally not reviewed on gists. Please make pull request and I will review
      • > where do I need to create the file test.sh?
      • You don't have to create it... It is inside listenbrainz-labs
      • sarthak_jain
        Ya got it
      • pristine__
        You just need to run `sudo ./test.sh`
      • sarthak_jain
        Where do I need to write my code?
      • I mean the test case I have written
      • pristine__
        > Where do I need to write my code?
      • Did you read pytest docs?
      • sarthak_jain
        Yes
      • pristine__
        How pytest discovers test files
      • sarthak_jain
        Yes
      • pristine__
      • Here.
      • Please go through it. And have a look how other test dirs are saved. If you are writing tests for stats module you should have a tests folder inside stats module and inside that tests folder you should have tests scripts for each script of stats.
      • And remember the name of script should be test_*
      • It can be test_init.py
      • sarthak_jain
        Ohh
      • pristine__
        That is why I said go through the codebase and figure out patterns :)
      • That is how I do it :p
      • sarthak_jain
        Should I do changes by adding a new branch?
      • pristine__
        Yes....one should avoid making changes in master
      • sarthak_jain
        Yas