#metabrainz

/

      • calcmandan-mobil has quit
      • 2017-07-13 19447, 2017

      • suhas2go has quit
      • 2017-07-13 19458, 2017

      • SothoTalKer has quit
      • 2017-07-13 19417, 2017

      • Major_Lurker joined the channel
      • 2017-07-13 19457, 2017

      • MajorLurker has quit
      • 2017-07-13 19401, 2017

      • SothoTalKer joined the channel
      • 2017-07-13 19424, 2017

      • drsaunder has quit
      • 2017-07-13 19408, 2017

      • drsaunders joined the channel
      • 2017-07-13 19433, 2017

      • Mineo joined the channel
      • 2017-07-13 19426, 2017

      • saifulbkhan joined the channel
      • 2017-07-13 19457, 2017

      • D4RK-PH0ENiX has quit
      • 2017-07-13 19416, 2017

      • Slurpee has quit
      • 2017-07-13 19427, 2017

      • D4RK-PH0ENiX joined the channel
      • 2017-07-13 19424, 2017

      • drsaunders has quit
      • 2017-07-13 19413, 2017

      • Mineo has quit
      • 2017-07-13 19406, 2017

      • D4RK-PH0ENiX has quit
      • 2017-07-13 19431, 2017

      • D4RK-PH0ENiX joined the channel
      • 2017-07-13 19419, 2017

      • Quesito
        Moin!
      • 2017-07-13 19444, 2017

      • cjnolet`office
        lol. it's 2:35am here. Mornin
      • 2017-07-13 19434, 2017

      • zas
        Moiiinnn Quesito
      • 2017-07-13 19402, 2017

      • Quesito
        Moin cjnolet`office and zas!
      • 2017-07-13 19401, 2017

      • Nyanko-sensei joined the channel
      • 2017-07-13 19423, 2017

      • D4RK-PH0ENiX has quit
      • 2017-07-13 19450, 2017

      • agentsim has quit
      • 2017-07-13 19423, 2017

      • agentsim joined the channel
      • 2017-07-13 19427, 2017

      • agentsim has quit
      • 2017-07-13 19432, 2017

      • drsaunder joined the channel
      • 2017-07-13 19457, 2017

      • drsaunder has quit
      • 2017-07-13 19436, 2017

      • sampsyo has quit
      • 2017-07-13 19405, 2017

      • sampsyo joined the channel
      • 2017-07-13 19435, 2017

      • samj1912 joined the channel
      • 2017-07-13 19447, 2017

      • agentsim joined the channel
      • 2017-07-13 19437, 2017

      • agentsim has quit
      • 2017-07-13 19404, 2017

      • UmkaDK joined the channel
      • 2017-07-13 19428, 2017

      • samj1912
        Morning o/
      • 2017-07-13 19457, 2017

      • zas
        Morning samj1912 \o/
      • 2017-07-13 19431, 2017

      • samj1912
        I'll make the switch to mbjson today
      • 2017-07-13 19439, 2017

      • samj1912
        In the tagger
      • 2017-07-13 19430, 2017

      • zas
        fantastic :)
      • 2017-07-13 19447, 2017

      • psolanki
        Morning people
      • 2017-07-13 19448, 2017

      • psolanki
        Is there a way to stop generating pycache folder every time docker-compose is run?
      • 2017-07-13 19420, 2017

      • psolanki
        I tried changing environment variable but it didn't work
      • 2017-07-13 19456, 2017

      • alastairp
        why do you not want to create it?
      • 2017-07-13 19408, 2017

      • psolanki
        It's a problem for pytest - attribute error
      • 2017-07-13 19409, 2017

      • psolanki
        I don't want .pyc files for my test branch
      • 2017-07-13 19436, 2017

      • alastairp
        you could try `python -B`, but I don't know if that will prevent them from being created in all cases
      • 2017-07-13 19410, 2017

      • psolanki
        I already tried it
      • 2017-07-13 19423, 2017

      • alastairp
        however, this might not be a good fix - consider if this issue happens just for you or also for other people. It's a bit confusing to say "you must run things in this branch with python -B otherwise it won't work"
      • 2017-07-13 19425, 2017

      • alastairp
        what is the branch that is causing you problems?
      • 2017-07-13 19437, 2017

      • alastairp
        does it happen only when you have been in another branch first?
      • 2017-07-13 19449, 2017

      • ferbncode
        alastairp: Hi :), the https://github.com/metabrainz/musicbrainz-server/… script runs well and seems to be a great way for creating the test database. We can test more cases using this way, I guess :). Example for generated sql for place > https://gist.github.com/ferbncode/31bf9cea8c4d886…
      • 2017-07-13 19413, 2017

      • psolanki
        No.
      • 2017-07-13 19414, 2017

      • psolanki
        I am adding and modifying some test scripts and run them individually with the command you suggested
      • 2017-07-13 19418, 2017

      • psolanki
        "docker-compose -f docker/docker-compose.dev.yml run critiquebrainz py.test <filename>"
      • 2017-07-13 19444, 2017

      • CatQuest
        ruaok: shall i start an import on lb while I myself go off in the sun that's appaeared today?
      • 2017-07-13 19444, 2017

      • alastairp
        ferbncode: cool. the question now is to see how you can import those sql scripts on demand in a test
      • 2017-07-13 19451, 2017

      • alastairp
        or if it's easier to use create_sample_data
      • 2017-07-13 19421, 2017

      • alastairp
        (I didn't know that create_sample_data existed - it might be a better solution, although you'll still need a test database)
      • 2017-07-13 19451, 2017

      • CatQuest
        (I readabout listenbrainz reset yesterday)
      • 2017-07-13 19453, 2017

      • alastairp
        CatQuest: that'd be great, thanks. note that ruaok had some counting problems, so perhaps you will have (worse than normal) problems too
      • 2017-07-13 19407, 2017

      • alastairp
        but it's always nice to have more data
      • 2017-07-13 19415, 2017

      • ferbncode
        I tried https://github.com/ferbncode/critiquebrainz/commi… for create_sample_data (works too) but sample data does not have example release_groups like https://critiquebrainz.org/release-group/8ef859e3… (multiple artists)
      • 2017-07-13 19451, 2017

      • CatQuest is afraid that ruaok didn't want to ask me since I said about it being a hassle (my point that time ws that doing it for testing to secure a great working lb isn't a hassle)
      • 2017-07-13 19425, 2017

      • alastairp
        right. another consideration is that we work with luks to improve the quality of the test data in mbdata - but that might take a few days to get some feedback from him
      • 2017-07-13 19411, 2017

      • CatQuest
        well I'm not using the computer now becasue going out in the sun, so it might as well import int olb. even if you wipe the db in a few hours
      • 2017-07-13 19429, 2017

      • alastairp
        psolanki: can you paste a full output of the error that you get? or put the code in its broken state in github somewhere so that someone else can test?
      • 2017-07-13 19456, 2017

      • CatQuest
        also I can' tel you when it's done, so you'll have to check youselves https://beta.listenbrainz.org/user/CatCat vs https://www.last.fm/user/Nasasie and such
      • 2017-07-13 19459, 2017

      • alastairp
        is this the error that Gentlecat was saying about the PR that you made? can I test it?
      • 2017-07-13 19427, 2017

      • alastairp
        CatQuest: if you're going out and there's nothing to prevent you from running it while you're away I would say yes - thanks!
      • 2017-07-13 19439, 2017

      • ferbncode
        alastairp: so, I would try to setup and run the sql generated and get back to you in case of anything. :)
      • 2017-07-13 19441, 2017

      • CatQuest starting it
      • 2017-07-13 19451, 2017

      • alastairp
        ferbncode: cool, let me know how you go
      • 2017-07-13 19407, 2017

      • ferbncode
        alastairp: sure, thanks :)
      • 2017-07-13 19417, 2017

      • alastairp
        sorry about the late review... I'm mostly on top of my reviews now so it should be faster from now on
      • 2017-07-13 19430, 2017

      • CatQuest
        not a problem. as I said, it's definitely not a hassle to do this like this. it's great to be useful to listenbrainz <3
      • 2017-07-13 19401, 2017

      • CatQuest
        alastairp: *do* tell that to rob will you :)
      • 2017-07-13 19412, 2017

      • CatQuest off in the sun \o
      • 2017-07-13 19424, 2017

      • ferbncode
        alastairp: thanks for the review, will definitely get the code and me improving :)
      • 2017-07-13 19410, 2017

      • psolanki
      • 2017-07-13 19410, 2017

      • psolanki
        And when I change it to "from critiquebrainz.db import users as db_users",
      • 2017-07-13 19411, 2017

      • psolanki
        It works perfectly fine
      • 2017-07-13 19429, 2017

      • psolanki
        I discussed it with Gentlecat and he told me to remove .pyc files
      • 2017-07-13 19430, 2017

      • psolanki
        But the problem is that they keep generating again and cause the error
      • 2017-07-13 19429, 2017

      • Gentlecat
        that was the suggestion we had at the time, but it's obviously a temporary solution
      • 2017-07-13 19403, 2017

      • alastairp
        so the error doesn't happen once, then when the pyc files are created it starts happening
      • 2017-07-13 19408, 2017

      • alastairp
        until you delete them again?
      • 2017-07-13 19412, 2017

      • Gentlecat
        and yeah, is that code on github?
      • 2017-07-13 19401, 2017

      • alastairp
        hmm, the other thing that I just noticed is that you have a circular import
      • 2017-07-13 19422, 2017

      • alastairp
        av_rating_test -> db.users -> db.revision -> db.review -> db.user -> db.users
      • 2017-07-13 19451, 2017

      • alastairp
        which could very well be the problem too
      • 2017-07-13 19416, 2017

      • github joined the channel
      • 2017-07-13 19416, 2017

      • github
        [musicbrainz-server] ferbncode opened pull request #528: MBS-9401: Fix sql query to fetch releases in dump-entities-sql.pl (master...fix-dump-release-groups) https://git.io/vQ9oH
      • 2017-07-13 19416, 2017

      • github has left the channel
      • 2017-07-13 19450, 2017

      • psolanki
        alastairp: I tried running in /bin/bash ,delete the .pyc files and then pytest
      • 2017-07-13 19451, 2017

      • psolanki
        But it gives the same error
      • 2017-07-13 19422, 2017

      • psolanki
        And yes, this code is on github
      • 2017-07-13 19406, 2017

      • alastairp
        I'm still not sure of the process where you get the error - sorry, what you said was unclear
      • 2017-07-13 19413, 2017

      • alastairp
        do you *always* get the error?
      • 2017-07-13 19415, 2017

      • psolanki
        Not if change "import critiquebrainz.db.users as db_users"
      • 2017-07-13 19416, 2017

      • psolanki
        to "from critiquebrainz.db import users as db_users"
      • 2017-07-13 19414, 2017

      • alastairp
        OK, I was unsure because you were talking about deleting the pyc files. I thought that the error did not happen directly after you deleted pyc files
      • 2017-07-13 19416, 2017

      • psolanki
        It works like a charm, all test pass
      • 2017-07-13 19459, 2017

      • psolanki
        I don't understand how a mere syntax change makes the difference
      • 2017-07-13 19457, 2017

      • alastairp
      • 2017-07-13 19423, 2017

      • alastairp
        I just recreated the error in a dummy structure - this is completely outside of critiquebrainz
      • 2017-07-13 19435, 2017

      • alastairp
        I now think that the error is because of a circular import
      • 2017-07-13 19453, 2017

      • alastairp
        see that you import the `users` module twice? once in the test file, and one in `user`?
      • 2017-07-13 19423, 2017

      • alastairp
        because of the way python works, it definitely makes sense that it would work with the other type of import
      • 2017-07-13 19412, 2017

      • alastairp
        note that it's not _just_ a syntax change. because of the way python packages work it's actually doing something different with the other import statement
      • 2017-07-13 19405, 2017

      • alastairp
        can you link us to the branch on github where you see the error? (it's easier for you to tell us where it is, rather than us go and look for it)
      • 2017-07-13 19446, 2017

      • psolanki
      • 2017-07-13 19413, 2017

      • psolanki
        What if we want to import a certain class.
      • 2017-07-13 19414, 2017

      • psolanki
      • 2017-07-13 19429, 2017

      • D4RK-PH0ENiX joined the channel
      • 2017-07-13 19413, 2017

      • Nyanko-sensei has quit
      • 2017-07-13 19409, 2017

      • alastairp
        right
      • 2017-07-13 19425, 2017

      • alastairp
        that is because of the import on line 9
      • 2017-07-13 19451, 2017

      • alastairp
        when python is reading a file and gets to an import it jumps to that other file
      • 2017-07-13 19456, 2017

      • alastairp
        so you start reading user.py
      • 2017-07-13 19405, 2017

      • alastairp
        then go through a bunch of other files
      • 2017-07-13 19426, 2017

      • alastairp
        when you get to line 8 in review.py, the User class in user.py doesn't exist yet
      • 2017-07-13 19430, 2017

      • alastairp
        because the python interpreter only got to line 2 in user.py before importing users.py
      • 2017-07-13 19440, 2017

      • iliekcomputers
        ruaok: last.fm shows 71602 scrobbles here https://www.last.fm/user/mayhemchaos/library
      • 2017-07-13 19458, 2017

      • iliekcomputers
        *71062
      • 2017-07-13 19408, 2017

      • iliekcomputers
        and 71319 scrobbles here https://www.last.fm/user/mayhemchaos
      • 2017-07-13 19426, 2017

      • iliekcomputers
        it sends us 71062 on the api
      • 2017-07-13 19440, 2017

      • ruaok
        am I the only person with this problem?
      • 2017-07-13 19441, 2017

      • alastairp
        the number says one thing, and you get a different number of them from the API?
      • 2017-07-13 19442, 2017

      • alastairp
        awesome
      • 2017-07-13 19456, 2017

      • ruaok
        yeah, that's going to be hell for us to answer to. :(
      • 2017-07-13 19416, 2017

      • iliekcomputers
        :(
      • 2017-07-13 19451, 2017

      • iliekcomputers
        CatQuest is doing an import, in the meanwhile I checked myself and the number of pages and scrobbles matches up for CatQuest
      • 2017-07-13 19457, 2017

      • ruaok
        alastairp: did your number match?
      • 2017-07-13 19411, 2017

      • alastairp
        I didn't even check. let me do that now
      • 2017-07-13 19420, 2017

      • ruaok
        I need to check catquest's import into my test account and see how that turned out.
      • 2017-07-13 19438, 2017

      • alastairp
        oh wow, exactly the same
      • 2017-07-13 19406, 2017

      • alastairp
        but mark (?) found 2 with the same timestamp/name
      • 2017-07-13 19414, 2017

      • alastairp
        not sure what you fixed :)
      • 2017-07-13 19423, 2017

      • iliekcomputers
        alastairp: they didn't have the same name
      • 2017-07-13 19427, 2017

      • alastairp
        ah
      • 2017-07-13 19458, 2017

      • iliekcomputers
      • 2017-07-13 19400, 2017

      • iliekcomputers
      • 2017-07-13 19419, 2017

      • alastairp
        OK, so this is the magic fix that we did yesterday
      • 2017-07-13 19422, 2017

      • alastairp
        great!
      • 2017-07-13 19457, 2017

      • iliekcomputers
      • 2017-07-13 19430, 2017

      • lazka joined the channel
      • 2017-07-13 19450, 2017

      • ruaok
        the review is merged, so it is ready for your review, alastairp. :)
      • 2017-07-13 19402, 2017

      • alastairp
        :( so mean
      • 2017-07-13 19411, 2017

      • alastairp
        I was thinking exactly that
      • 2017-07-13 19416, 2017

      • ruaok
        awww <3