[Rbrainz-users] REXML::ParseException: Declarations can only occur in the doctype declaration. (MusicBrainz::Webservice::ResponseError)

Armin Otto arminotto at googlemail.com
Fri Aug 17 07:57:16 EDT 2007


I filled my database some time ago with lots of song titles and artist
names. some special characters turned up like the evil german Umlaute. :)

I'll tidy that up, of course, however, a program i wrote to scan musicbrainz
using  the names in the database gave me an unexpected error.

To demonstrate, i included two queries. The first one works, the second
doesn't.
And I have no idea why it doesn't and the other one does, since they don't
look that different to me.
(both are expected to deliver no usable results, but thats okay ;) )


here's the executable source :

-------------------- snip -------------------

require 'rbrainz'

def self.get_brainz_tracks(filter,
                        includes = {
                          :artist       => true,
                          :releases     => true,
                          :puids        => true,
                          :artist_rels  => true,
                          :release_rels => true,
                          :track_rels   => true,
                          :label_rels   => true,
                          :url_rels     => true,
                          :tags         => true })
    track_includes = MusicBrainz::Webservice::TrackIncludes.new(includes)
    query  = MusicBrainz::Webservice::Query.new
    track_filter = MusicBrainz::Webservice::TrackFilter.new(filter)
    puts track_filter.inspect
    begin
      result = query.get_tracks(track_filter)
      puts "# result size: #{result.size}"
    rescue
      puts $!
      result = nil
    end
    result
  end

puts get_brainz_tracks({
  :title  => "Lil\302\264 Love",
  :artist => "Little love",
  :limit  => 5 })
puts get_brainz_tracks({
  :title  => "Christina St\374rmer",
  :artist => "Mama (Ana Ahabak)",
  :limit  => 5 })

--------------- snip -------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rbrainz-users/attachments/20070817/7bcbd32b/attachment.html 


More information about the Rbrainz-users mailing list