Giter VIP home page Giter VIP logo

musicbrainz's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

musicbrainz's Issues

Encoding::UndefinedConversionError raised when accessing an artist with UTF-8 characters from a Rails app

When using the musicbrainz gem in a Rails (3.2.8) application, I'm getting a Encoding::UndefinedConversionError when the CachingProxy writes a response to disk.

This only happens within the Rails application - I haven't been able to replicate it from elsewhere.

I've been able to get around the problem by making the CachingProxy write the file in binary mode (i.e. File.open(file_path, 'wb') ...), but because I'm unable to replicate the issue outside of Rails I'm not sure whether this is the best approach.

Any ideas?

e.g. from the Rails console

    Loading development environment (Rails 3.2.8)
irb(main):001:0> MusicBrainz::Artist.find("7cfaac66-62e5-4fcd-af1b-9d3aa8f68e8b")
Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client_modules/caching_proxy.rb:26:in `write'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client_modules/caching_proxy.rb:26:in `puts'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client_modules/caching_proxy.rb:26:in `block in get_contents'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client_modules/caching_proxy.rb:25:in `open'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client_modules/caching_proxy.rb:25:in `get_contents'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client.rb:29:in `contents_of'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/client.rb:12:in `load'
    from /Users/sinclp01/Documents/Code/musicbrainz/lib/musicbrainz/models/artist.rb:25:in `find'
    from (irb):1
    from /Users/sinclp01/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
    from /Users/sinclp01/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
    from /Users/sinclp01/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Are you planning to replace Test::Unit by RSpec tests here?

It looks like you started to replace the Test::Unit by RSpec tests here?

Does this mean that you plan to use only RSpec tests in the future?

I need to know your decision cause I will do a contribution some day. Maybe I can also migrate those unit tests to RSpec with my contribution.

Kind regards

Mathias

MusicBrainz::Recording Not Defined

The Readme states that MusicBrainz::Track is deprecated and to use MusicBrainz::Recording, but MusicBrainz::Recording is not defined in version 0.7.7 (latest).

MusicBrainz::Track.search returns nil, even when the search is valid, every time as well.

Error parsing date

I'm getting the following error when trying to fetch release groups for an artist:

> MusicBrainz::Artist.find("309c62ba-7a22-4277-9f67-4a162526d18a").release_groups

ArgumentError: invalid date
  from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/date.rb:809:in `civil'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/models/base_model.rb:56:in `validate_type'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/models/base_model.rb:14:in `block in field'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/models/base_model.rb:31:in `block in initialize'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/models/base_model.rb:30:in `each'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/models/base_model.rb:30:in `initialize'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/client.rb:29:in `new'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/client.rb:29:in `block in load'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/client.rb:29:in `map'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/client.rb:29:in `load'
  from /data/sensei/shared/bundle/ruby/1.9.1/bundler/gems/musicbrainz-abd67818d352/lib/musicbrainz/models/artist.rb:12:in `release_groups'
  from (irb):7
  from /data/sensei/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start'
  from /data/sensei/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start'
  from /data/sensei/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:41:in `<top (required)>'
  from script/rails:6:in `require'
  from script/rails:6:in `<main>'

File cache error while FileUtils.mkdir_p

Sometimes, once in a while (especially when my Sidekiq worker works in the background), I get the error below:

Errno::ENOENT: Errno::ENOENT: No such file or directory @ dir_s_mkdir - tmp

My code: MusicBrainz::Artist.find(mbid)
Stack trace:

39: File "[GEM_ROOT]/gems/musicbrainz-0.7.6/lib/musicbrainz/models/artist.rb" line 21 in find
40: File "[GEM_ROOT]/gems/musicbrainz-0.7.6/lib/musicbrainz/client.rb" line 19 in load
41: File "[GEM_ROOT]/gems/musicbrainz-0.7.6/lib/musicbrainz/client_modules/caching_proxy.rb" line 29 in get_contents
42: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 208 in mkdir_p
43: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 208 in each
44: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 222 in block in mkdir_p
45: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 222 in reverse_each
46: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 224 in block (2 levels) in mkdir_p
47: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 250 in fu_mkdir
48: File "/opt/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb" line 250 in mkdir

Any idea what's wrong? Is this because my tasks run concurrent, or is the error somewhere else on my side?

Release New Version

When are you planning to release a new version? The current version (0.7.7) doesn't include some required features (like find by discid).

Error handling

Hi,

I'm trying to test my app using musicbrainz and stub requests with vcr.
I had to remove the rescue in TransparentProxy : 344dfdb

VCR needs to raise an error to display its message.
Moreover it could be useful to raise an error to allow design by error handling, at least to have the choice.

urls property does not contain all external links

Hello there,

I'm playing around with the gem. A little that i dont know if its the caching problem or not.

madonna = MusicBrainz::Artist.find('79239441-bfd5-4981-a70c-55c3f15c1287')
puts madonna.urls.inspect

{:fanpage=>"http://www.minsane.com.br/", :wikipedia=>"http://en.wikipedia.org/wiki/Madonna_(entertainer)", :lyrics=>"http://www.lyricstatus.com/madonna-lyrics", :musicmoz=>"http://musicmoz.org/Bands_and_Artists/M/Madonna/", :other_databases=>"http://rateyourmusic.com/artist/madonna", :soundcloud=>"http://soundcloud.com/madonna", :viaf=>"http://viaf.org/viaf/59270244", :allmusic=>"http://www.allmusic.com/artist/mn0000237205", :bbc_music_page=>"http://www.bbc.co.uk/music/artists/79239441-bfd5-4981-a70c-55c3f15c1287", :discogs=>"http://www.discogs.com/artist/Madonna", :social_network=>"https://www.facebook.com/madonna", :imdb=>"http://www.imdb.com/name/nm0000187/", :official_homepage=>"http://www.madonna.com/", :discography=>"http://www.madonnarecords.com/", :myspace=>"http://www.myspace.com/madonna", :secondhandsongs=>"http://www.secondhandsongs.com/artist/84", :wikidata=>"http://www.wikidata.org/wiki/Q1744", :youtube=>"http://www.youtube.com/user/madonna"}

But visit this original musicbrainz page of madonna. there is g+ link
Any idea?
thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.