2

I'm trying to write a short script that reads Label ID's of records from a CSV file, searches Discogs for them and returns all the info found, I'm using this ruby wrapper to access Discogs:

https://github.com/buntine/discogs

require 'discogs-wrapper'
require 'pp'
aw = Discogs::Wrapper.new("My_Application", user_token: "My_Token")
path="Path to my CSV File with Label ID's of Records"
seperator = ','
values = File.open(path).map{|line| line.chop.split(seperator)}
temp_data=aw.search(values[0][0])["results"][0]
pp aw.get_release(temp_data['id'])['status']

Got this as return:

[DEPRECATED]: The key 'count' has been replaced with 'total'. When     accessing, please use the latter. This message will be removed in the next major     release.
W, [2018-01-15T19:29:26.463127 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#count defined in Enumerable. This     can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.467639 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.469200 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2018-01-15T19:29:26.469642 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.470643 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.471159 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.471644 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.472192 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.472653 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.473155 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.473653 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.

To be honest I'm not really sure what this means to me, I'm pretty new to ruby, but as far as I can see I did not mess with Syntax or Discogs own structure, or did I just get something wrong? Thank you very much! Greetings, rtuz2th

max pleaner
  • 26,189
  • 9
  • 66
  • 118
rtuz2th
  • 79
  • 8
  • Just want to point out your original code wouldn't run since it had some small issues (e.g. single quote delimited string containing a single quote character). Anyway, I'm not sure, but I see you raised an issue on the github which is a good start – max pleaner Jan 15 '18 at 22:42
  • The gem `discogs-wrapper` depends on 3 other gems: `hashie`, `httparty` and `oauth`, and that deprecation warning is most likely coming from one of these 3 gems (or their dependencies). It's just a deprecation warning, you don't need to worry about it (yet). Just make sure you'e always using the most up to date version. – Tamer Shlash Jan 15 '18 at 22:52
  • Okay, thank you very much for your help! Wasn't shure if it was my mistake, so I wasn't shure about github. – rtuz2th Jan 16 '18 at 12:06

0 Answers0