#metabrainz

/

      • alastairp
        so if for example it was `None` or `{}`, then the `[0]` would cause an error
      • 2022-07-27 20847, 2022

      • alastairp
        even if it was `[]` we'd get an error
      • 2022-07-27 20807, 2022

      • alastairp
        Pratha-Fish: right. I was looking at the other one. that's good then
      • 2022-07-27 20815, 2022

      • ansh
        The edition group['author_credits'] returns an array of objects. So if it does not exist, the database returns [None]
      • 2022-07-27 20816, 2022

      • alastairp
        how many items did you look up to result in just these 2?
      • 2022-07-27 20841, 2022

      • alastairp
        ansh: is this the direct result from the view?
      • 2022-07-27 20849, 2022

      • ansh
        yes
      • 2022-07-27 20805, 2022

      • ansh
        I added a table in the views for the author credits
      • 2022-07-27 20822, 2022

      • alastairp
        right, that's a bit strange. give me a moment, I want to check this query myself
      • 2022-07-27 20854, 2022

      • alastairp
        Pratha-Fish: that first one is really weird... is this a uuid being used as an artist name? or a bug in the generation of the table?
      • 2022-07-27 20857, 2022

      • ansh
        Sure
      • 2022-07-27 20811, 2022

      • Pratha-Fish
        alastairp: I rechecked that one, apparently, it's a uuid that's being used as artist name!
      • 2022-07-27 20814, 2022

      • Sophist-UK has quit
      • 2022-07-27 20835, 2022

      • Pratha-Fish
        No bugs in table generation afaik
      • 2022-07-27 20829, 2022

      • Sophist-UK joined the channel
      • 2022-07-27 20855, 2022

      • alastairp
        what's the original recording mbid, then?
      • 2022-07-27 20801, 2022

      • alastairp
        Pratha-Fish: oh, I think I worked out the unicode issue
      • 2022-07-27 20810, 2022

      • alastairp
        we never actually made this an html document
      • 2022-07-27 20811, 2022

      • alastairp
      • 2022-07-27 20824, 2022

      • alastairp
        check out the last section - "The Complete HTML5 Boilerplate"
      • 2022-07-27 20818, 2022

      • Sophist_UK joined the channel
      • 2022-07-27 20832, 2022

      • alastairp
        we should use something like that. we don't need any of the `<meta property=>` or `<link>` or `<script>` tags, but copy the rest
      • 2022-07-27 20836, 2022

      • alastairp
        and put the table inside <body>
      • 2022-07-27 20853, 2022

      • Pratha-Fish
        alastairp: The original recording MBID is the same as the artist_name, recording_name, and the canonical_mbid!
      • 2022-07-27 20805, 2022

      • alastairp
        Pratha-Fish: that's why I think it's a bug
      • 2022-07-27 20818, 2022

      • alastairp
        because when I click on the link for the canonical mbid, musicbrainz tells me that it doesn't exist
      • 2022-07-27 20846, 2022

      • alastairp
        but that's almost certain to be impossible, all canonical mbids should exist
      • 2022-07-27 20852, 2022

      • Sophist-UK has quit
      • 2022-07-27 20811, 2022

      • Pratha-Fish
        alastairp: exactly! That ID doesn't exist in the musicbrainz table. I just rechecked the specific row in jupyter, and here's what I've found
      • 2022-07-27 20829, 2022

      • Pratha-Fish
      • 2022-07-27 20846, 2022

      • Pratha-Fish
        This is before running the mbc.
      • 2022-07-27 20811, 2022

      • Pratha-Fish
        mlhd_recording_mbid is from MLHD
      • 2022-07-27 20854, 2022

      • Pratha-Fish
        mlhd_canonical_mbid is what I found by looking up the mlhd_recording_mbid in redirects and then canonical table
      • 2022-07-27 20835, 2022

      • Pratha-Fish
        Then the mlhd_canonical_mbid is then used with an artist_credit query
      • 2022-07-27 20835, 2022

      • alastairp
        where do you get rec_name from?
      • 2022-07-27 20806, 2022

      • alastairp
        (btw, this is another great reason to have our code in scripts rather than a notebook, because then you could link me to the exact line in github)
      • 2022-07-27 20807, 2022

      • Pratha-Fish
        alastairp: The rec_name and artist_credit are fetched using a SQL query
      • 2022-07-27 20829, 2022

      • Pratha-Fish
        So I am guessing it's a fault in the musicbrainz db
      • 2022-07-27 20834, 2022

      • alastairp
        the fact that rec_name is the same as mlhd_recording_mbid makes me thing that there's a bug with this sql query
      • 2022-07-27 20853, 2022

      • alastairp
        no, almost certainly not an issue with the database, probably a problem with the way that we are reading it
      • 2022-07-27 20858, 2022

      • Pratha-Fish
        alastairp: thankfully I have all this data in a script as well :D
      • 2022-07-27 20808, 2022

      • alastairp
        great! where's the line, then?
      • 2022-07-27 20832, 2022

      • Sophist-UK joined the channel
      • 2022-07-27 20807, 2022

      • Pratha-Fish
      • 2022-07-27 20850, 2022

      • Pratha-Fish
        alastairp: The row I shared earlier is from this particular table. All other rows have their specific rec_name and artist_credit data in place
      • 2022-07-27 20823, 2022

      • Pratha-Fish
        https://github.com/Prathamesh-Ghatole/MLHD/blob/m… => This script generates everything from scratch
      • 2022-07-27 20839, 2022

      • Pratha-Fish
        https://github.com/Prathamesh-Ghatole/MLHD/blob/m… => This library has all the helper functions
      • 2022-07-27 20856, 2022

      • alastairp
        what line makes this dataframe? (please make it easy for me to follow along)
      • 2022-07-27 20806, 2022

      • alastairp
        you can click on a line number to get a URL that links to the line
      • 2022-07-27 20806, 2022

      • Pratha-Fish
        right, sorry for the confusion
      • 2022-07-27 20847, 2022

      • Sophist_UK has quit
      • 2022-07-27 20805, 2022

      • Sophist_UK joined the channel
      • 2022-07-27 20806, 2022

      • Sophist_UK has quit
      • 2022-07-27 20841, 2022

      • Pratha-Fish
      • 2022-07-27 20802, 2022

      • Sophist-UK has quit
      • 2022-07-27 20846, 2022

      • Pratha-Fish
        This line fetches rec_name and artist_credit using the artist_credit_list query that you shared last week
      • 2022-07-27 20809, 2022

      • alastairp
        Pratha-Fish: I'd look in detail at your replace_multi method
      • 2022-07-27 20824, 2022

      • Pratha-Fish
        right
      • 2022-07-27 20841, 2022

      • Sophist-UK joined the channel
      • 2022-07-27 20851, 2022

      • Pratha-Fish
        https://github.com/Prathamesh-Ghatole/MLHD/blob/5… => Here's the replace multi function
      • 2022-07-27 20855, 2022

      • alastairp
        immediately, I suspect that the item (recording mbid) that you're trying to look up doesn't exist in the musicbrainz database any more, and it's using the lookup key as the result rather than returning "none" or something
      • 2022-07-27 20808, 2022

      • alastairp
        reading the code, I can't confirm if that is the case, but I suspect so
      • 2022-07-27 20839, 2022

      • Pratha-Fish
        Hmm that seems likely
      • 2022-07-27 20806, 2022

      • Pratha-Fish
      • 2022-07-27 20806, 2022

      • Pratha-Fish
        Here's what the replace_multi function uses under the hood.
      • 2022-07-27 20817, 2022

      • Pratha-Fish
        Aaand you were exactly right!
      • 2022-07-27 20833, 2022

      • alastairp
        yes, I saw that. but I don't know pandas enough to understand that behaviour just by reading the code
      • 2022-07-27 20854, 2022

      • Pratha-Fish
      • 2022-07-27 20830, 2022

      • Pratha-Fish
        alastairp: ^ The above code just looks up the input value (in this case canonical_mbid) in the specified table (the artist_credit one)
      • 2022-07-27 20836, 2022

      • alastairp
        oh right. I missed the 'except KeyError'
      • 2022-07-27 20844, 2022

      • Sophist-UK has quit
      • 2022-07-27 20852, 2022

      • Sophist_UK joined the channel
      • 2022-07-27 20854, 2022

      • Pratha-Fish
        yep :)
      • 2022-07-27 20820, 2022

      • Pratha-Fish
        i.e. in this particular case the "canonical_mbid" simply doesn't exist in the table
      • 2022-07-27 20844, 2022

      • alastairp
        ansh: do you have an example of an edition group whose author list is [None] ?
      • 2022-07-27 20818, 2022

      • alastairp
        Pratha-Fish: sorry, I have to run now. I have an event in an hour and need to go and get lunch first
      • 2022-07-27 20831, 2022

      • alastairp
        do you have enough to work on?
      • 2022-07-27 20852, 2022

      • Pratha-Fish
        alastairp: It's alright! I think I have enough to work on right now.
      • 2022-07-27 20855, 2022

      • alastairp
        finding this issue + doing fast lookups for mbc + fixing html table output sounds like it should keep you busy
      • 2022-07-27 20808, 2022

      • Pratha-Fish
        that's right
      • 2022-07-27 20844, 2022

      • alastairp
        great, tomorrow morning I'm giving a talk, but I should be online with my laptop through the afternoon
      • 2022-07-27 20852, 2022

      • ansh
        alastairp: yep '02ae4cfc-6412-4693-93b1-e24dce5e31f9'
      • 2022-07-27 20805, 2022

      • alastairp
        ansh: thanks, I'll check this when I'm finished with my other tasks today
      • 2022-07-27 20813, 2022

      • Pratha-Fish
        alastairp: great, I'll ping you only when required.
      • 2022-07-27 20820, 2022

      • ansh
        I feel we should move this variable `DEFAULT_CACHE_EXPIRATION` used in many places to our config file, it would be really useful. We could disable cache with a single click :)
      • 2022-07-27 20852, 2022

      • Sophist_UK has quit
      • 2022-07-27 20812, 2022

      • alastairp
        ansh: go ahead and open a PR for that!
      • 2022-07-27 20823, 2022

      • alastairp
        ansh: normally when I do this, I open a redis shell and just run FLUSHALL
      • 2022-07-27 20842, 2022

      • alastairp
        ansh: one really small thing too - I was just looking at the sql query in `fetch_multiple_edition_groups` and it has a trailing ;
      • 2022-07-27 20856, 2022

      • alastairp
        this isn't needed when running sql from python, can you remove it?
      • 2022-07-27 20843, 2022

      • ansh
        alastairp: I'll remove the semicolon
      • 2022-07-27 20859, 2022

      • alastairp
        ansh: I ran this query with the bbid, and see the result. to me this seems a bit odd, and it might be better to try and modify the aggregate to make the query return [] instead of [null]
      • 2022-07-27 20837, 2022

      • alastairp gone
      • 2022-07-27 20802, 2022

      • ansh
        alastairp: Okay, i'll try to modify it.
      • 2022-07-27 20842, 2022

      • s1b1 has quit
      • 2022-07-27 20838, 2022

      • s1b1 joined the channel
      • 2022-07-27 20841, 2022

      • yvanzo
        hi reosarevok: my dev env is currently broken, do you plan to work on MBS-12512 again today?
      • 2022-07-27 20842, 2022

      • BrainzBot
        MBS-12512: genre_alias_type not being dumped in SampleDataDump https://tickets.metabrainz.org/browse/MBS-12512
      • 2022-07-27 20802, 2022

      • reosarevok
        That's supposed to be fixed with the latest sample dump we generated a few days ago
      • 2022-07-27 20807, 2022

      • reosarevok
        Have you tried it?
      • 2022-07-27 20819, 2022

      • reosarevok
        Hmm, checking
      • 2022-07-27 20814, 2022

      • yvanzo
        I tried it, see the comments.
      • 2022-07-27 20829, 2022

      • yvanzo
        Have you tried it?
      • 2022-07-27 20855, 2022

      • reosarevok
        No, because I got a report that it worked fine now
      • 2022-07-27 20859, 2022

      • reosarevok
        Let's see
      • 2022-07-27 20834, 2022

      • yvanzo
        zas: I have access, thanks.
      • 2022-07-27 20822, 2022

      • reosarevok
        yvanzo: it's fixed, but the fix was merged into production
      • 2022-07-27 20830, 2022

      • reosarevok
        So you need to also import from the production branch
      • 2022-07-27 20848, 2022

      • reosarevok
        (I tested, importing from master skips genre_alias_type, but from prod it does not)
      • 2022-07-27 20851, 2022

      • yvanzo
        Alright, thank you, will test.
      • 2022-07-27 20801, 2022

      • reosarevok
        I'm still finishing an import in prod, you can wait 5 min if you want me to confirm :)
      • 2022-07-27 20807, 2022

      • reosarevok
        But it didn't skip that, at least
      • 2022-07-27 20801, 2022

      • reosarevok
        yvanzo: confirmed, worked in the production branch
      • 2022-07-27 20801, 2022

      • yvanzo
        It worked here too.
      • 2022-07-27 20841, 2022

      • reosarevok
        Yay
      • 2022-07-27 20855, 2022

      • reosarevok
        Sorry for not checking that first and causing the annoyance
      • 2022-07-27 20812, 2022

      • yvanzo
        No problem, thanks for the quick resolution.
      • 2022-07-27 20809, 2022

      • PetrCBRCZ
        yvanzo: do you have another tip how to clean cache for slave MB installation ?
      • 2022-07-27 20843, 2022

      • yvanzo
        PetrCBRCZ: that was the reason I was trying to refresh my dev env, still on it.
      • 2022-07-27 20809, 2022

      • PetrCBRCZ
        yvanzo: ahh ... ok ...thx ;-)
      • 2022-07-27 20849, 2022

      • yvanzo
        PetrCBRCZ: It returns "OK" here.
      • 2022-07-27 20853, 2022

      • yvanzo
        The message you copied is returned by the following command? sudo docker-compose exec redis redis-cli FLUSHALL
      • 2022-07-27 20841, 2022

      • PetrCBRCZ
        yes ... it returns "(error) READONLY You can't write against a read only slave."
      • 2022-07-27 20801, 2022

      • yvanzo
        You should be able to check the number of items in Redis database with: sudo docker-compose exec redis redis-cli DBSIZE
      • 2022-07-27 20801, 2022

      • PetrCBRCZ
        (integer) 388069
      • 2022-07-27 20825, 2022

      • yvanzo
        It is unclear why it would be set to READONLY.
      • 2022-07-27 20850, 2022

      • yvanzo
        PetrCBRCZ: Try that instead: sudo docker-compose exec redis redis-cli FLUSHDB
      • 2022-07-27 20819, 2022

      • PetrCBRCZ
        same error
      • 2022-07-27 20836, 2022

      • yvanzo
        There might be an issue with your Redis instance.
      • 2022-07-27 20842, 2022

      • yvanzo
        INFO should provide more details for debugging.
      • 2022-07-27 20850, 2022

      • PetrCBRCZ
        # Server
      • 2022-07-27 20851, 2022

      • PetrCBRCZ
        redis_version:3.2.12
      • 2022-07-27 20851, 2022

      • PetrCBRCZ
        redis_git_sha1:00000000
      • 2022-07-27 20852, 2022

      • PetrCBRCZ
        redis_git_dirty:0
      • 2022-07-27 20852, 2022

      • PetrCBRCZ
        redis_build_id:b9a4cd86ce8027d3
      • 2022-07-27 20853, 2022

      • PetrCBRCZ
        redis_mode:standalone
      • 2022-07-27 20853, 2022

      • PetrCBRCZ
        os:Linux 5.4.0-121-generic x86_64
      • 2022-07-27 20854, 2022

      • PetrCBRCZ
        arch_bits:64
      • 2022-07-27 20854, 2022

      • PetrCBRCZ
        multiplexing_api:epoll
      • 2022-07-27 20855, 2022

      • PetrCBRCZ
        gcc_version:6.4.0
      • 2022-07-27 20855, 2022

      • PetrCBRCZ
        process_id:1
      • 2022-07-27 20856, 2022

      • PetrCBRCZ
        run_id:8fc13aa160b0d4e660ae3f0de2c91bd4b5d6ca90
      • 2022-07-27 20856, 2022

      • PetrCBRCZ
        tcp_port:6379
      • 2022-07-27 20857, 2022

      • PetrCBRCZ
        uptime_in_seconds:1649137
      • 2022-07-27 20857, 2022

      • PetrCBRCZ
        uptime_in_days:19
      • 2022-07-27 20858, 2022

      • PetrCBRCZ
        hz:10
      • 2022-07-27 20858, 2022

      • PetrCBRCZ
        lru_clock:14759047
      • 2022-07-27 20859, 2022

      • PetrCBRCZ
        executable:/data/redis-server
      • 2022-07-27 20810, 2022

      • PetrCBRCZ
        mem_allocator:jemalloc-4.0.3
      • 2022-07-27 20810, 2022

      • PetrCBRCZ
        # Persistence