[15:15:33] why is https://github.com/infobliss/sibutest2/blob/master/Glam_mappings/AmsterdamMuseum.py#L43 saying AttributeError: 'AmsterdamMuseumGLAM' object has no attribute 'categories'? [15:17:20] same kind of error here https://github.com/infobliss/sibutest2/blob/master/Glam_mappings/AmsterdamMuseum.py#L317 [15:17:45] AttributeError: 'AmsterdamMuseumGLAM' object has no attribute 'parameters' [16:42:26] Never mind [16:42:30] I got it [17:13:50] hi [17:14:25] infobliss: can you submit your work from the last 3 days? [17:15:21] ok [17:16:46] please commit (and push) daily so we can see the progress [17:21:07] done [17:24:35] what is not working as expected? [17:25:44] there are exceptions I am working to fix them [17:27:27] https://github.com/infobliss/sibutest2/blob/master/glams/AmsterdamMuseumGLAM.py#L85 [17:27:42] gives "KeyError: 'adlibJSON'" [17:28:21] when you call the init method? [17:28:45] yes [17:29:03] what priref are you sending? [17:29:25] the solution is very simple [17:29:32] if not 'adlibJSON' in self.data: return False # no recordlist found (identifier doesn't exist) [17:30:05] but good chance the thing you're calling it with is problematic, as this is an indication there's not metadata on it [17:30:49] I sent the sample priref from the comment [17:30:53] wait a sec [17:31:08] 5782 [17:31:42] that's weird [17:32:41] so look what's inside self.data [17:32:48] it gives the json [17:33:07] it works fine when I ran on a local test program [17:34:01] please copy the json [17:34:04] so I can look at it [17:34:12] ok [17:34:15] wait a sec [17:34:44] the "if not 'adlibJSON' in self.data: return False " is needed I believe [17:34:51] if there are no results it fails otherwise [17:34:57] (e.g. if you type 123434312431) [17:36:20] https://codeshare.io/Gbr60j [17:37:01] if that is in self.data then that error should not be given [17:37:09] because the key is in it [17:37:25] does it work locally for you/ [17:37:26] ? [17:37:34] yes it works locally [17:38:05] and where is the json from? [17:38:14] in the codeshare? [17:39:12] this is the json [17:39:49] from local? [17:39:56] or from the web? [17:40:02] or from the toollabs run? [17:40:13] local setup [17:40:23] .... [17:40:36] ? [17:40:38] it's failing on the toollabs setup? [17:40:50] no not in toollabs [17:40:57] where is it failing/ [17:40:57] ? [17:41:03] I have a local oauth consumer [17:41:12] so with oauth it fails? [17:41:13] where I can simulate and test [17:41:41] ok is this json from when you run it with oauth (not working) or when you run it without oauth (working)? [17:42:05] the oauth is not an issue [17:42:19] I have copied the code into a local test file [17:42:22] you said it's not working? [17:42:24] I will send you [17:42:26] where is it not working [17:42:27] here it works [17:42:35] I care about when it doesn't work [17:42:44] no sense in debugging code based on the working example [17:42:50] ok you are not getting me [17:43:00] yep I don't understand [17:43:13] you said it's returning a key error [17:43:18] in which situation does it do that [17:43:28] I have an entire setup which is Oauth verification enabled. [17:43:34] yes I understand [17:43:41] in that setup you say it's not working? [17:43:45] this is the setup where it gives error [17:43:49] so there it's giving a key error [17:43:52] ok \ [17:43:57] is the json in the codeshare from that setup? [17:44:04] yup [17:44:40] printed before line 85? [17:45:08] it's a bit strange it's giving a key error when the key is there [17:45:26] yeah [17:45:46] let me find out the root cause [17:45:58] "if not 'adlibJSON' in self.data: return False " is not needed btw, sorry about that [17:46:12] 'adlibjson' is always present, also with invalid requests [17:46:27] althought it wont hurt [17:48:10] I am taking 10 more minutes to investigate this [17:49:59] ok [17:54:26] strangely the parsed jsons produced every time for the same priref are not exactly same [17:56:03] weird [17:56:30] https://codeshare.io/axew3N [17:57:28] and this time the KeyError is gone too [17:58:36] but since the __init__ did not initialize categories [17:58:38] AttributeError: 'AmsterdamMuseumGLAM' object has no attribute 'categories' [18:03:18] well looks like its only the order of the key value pairs that got shuffled [18:12:35] hi basvb can you suggest a suitable category for http://am.adlibhosting.com/amonline/Details/collect/1287? [18:12:53] for test upload [18:14:48] I can't determine which building that is [18:15:15] ok empty category is ok? [18:15:41] not really [18:16:14] empty for sure is not, but none is also not really wishes [18:16:17] wished [18:16:22] you can select another image [18:16:44] AttributeError: 'AmsterdamMuseumGLAM' object has no attribute 'categories' [18:16:52] I don't see what would cause that [18:17:02] http://am.adlibhosting.com/amonline/Details/collect/540 [18:17:05] seems like information getting dropped somehow [18:17:14] ? [18:18:16] is that for the image or the information drop? [18:18:47] I don't know [18:18:55] you put a question mark [18:19:00] what are you saying with it [18:19:02] ok [18:19:07] info drop [18:19:07] does it refer to what I say or to you image link [18:19:55] can you please say a bit more, do you not understand what I mean with info drop and should I explain? [18:20:06] sorry you're a bit vague in communication I can't read minds [18:20:36] as of now please suggest a category for that image [18:20:54] so it's about the image? [18:20:58] I'm getting lost [18:21:15] that error I will be able to handle [18:21:29] I wish to test uploading this image now [18:21:31] ok, well the image you're also able to handle, just type some keywords into commons [18:21:46] https://commons.wikimedia.org/w/index.php?search=Michiel+Servaesz+Nouts&title=Special:Search&go=Go&searchToken=ddx5vmpi23r5o3qyixc9m90yh [18:23:10] ok I see [18:23:13] Thanks [18:24:18] and the painting category does not apply [18:24:22] since this is not a painting [18:26:03] pardom me [18:26:12] I do not see the painting category [18:28:08] I mean I can't find where the painting category is [18:28:25] [[Category:Portrait paintings of men in the Amsterdam Museum]] [[Category:Michiel Nouts]] [18:28:56] the portrait painting one [18:29:17] ok this is incorrect [18:29:54] I think I will have difficulty in writing a proper category for images [18:30:11] But I will require to upload only a few images [18:30:32] I don't get it [18:30:35] Is this ok if you edit the wikitext for those at a later time? [18:31:02] preferably not, I rather have you just do some searching to ensure the files can be uploaded [18:31:17] if you search 1-2 min for a file you can find an ok category [18:31:23] if you can't skip that image [18:31:58] For eg I searched this https://commons.wikimedia.org/w/index.php?search=gasthuis+te+Amsterdam&title=Special:Search&profile=default&fulltext=1&searchToken=792ee6982o821b76hnc8ak16w [18:32:14] taking keywords from http://am.adlibhosting.com/amonline/Details/collect/1287? [18:32:44] that one was too difficult [18:32:46] I am at a loss as to what category should be chosen [18:32:51] I can't find the correct one either [18:32:58] ok [18:33:01] because it can be one of 10 buildings [18:33:03] so skip it [18:33:23] ok [18:48:43] hello basvb [18:48:50] https://commons.wikimedia.org/wiki/File:Portret_van_een_man_-_102667_-_AM.jpg [18:49:03] This I uploaded just now from AM [18:49:28] looks like some things are going wrong [18:49:29] As category I added "Portraits by Bartholomeus van der Helst" [18:49:39] that was a non-existing category? [18:50:29] I am not sure I saw some image has a category saying "Portraits from paintername" [18:50:49] after that I added this [18:51:19] yeah [18:51:24] it is a red link [18:51:56] dimensions not coming as expected [18:52:03] let me investigate [18:52:46] https://commons.wikimedia.org/wiki/File:Portret_van_een_man_-_102667_-_AM.jpg fixes [18:52:57] https://commons.wikimedia.org/w/index.php?title=File:Portret_van_een_man_-_102667_-_AM.jpg&diff=254617096&oldid=254617063 [18:53:04] there should be ' =' in the code instead of '| ' [18:53:16] both without the spaces [18:54:20] I see [18:54:56] I also fixed the categorie [18:54:58] category [18:55:16] the formatting of the author field is also quite ugly [18:55:23] probably removing the brackets is best there [18:59:26] you mean the parenthesis ({{nl|schilder}}) in artist? [19:00:54] yep you see how that looks when you view the image? [19:01:12] apparently the language-templates add enters [19:01:42] although that's a bit odd