Subject: Re: Invalid encoding symbol when doing Marshal.load

From: Gaute Hope <[email-masked]>
Date: Thu, 09 Jun 2011 13:28:07 +0200

Excerpts from Gaute Hope's message of 2011-06-02 16:36:04 +0200:
> Hi,
> 
> I've been searching a bit through some old mail and suddenly encountered
> the following error:
> 
>   --- EncodingError from thread: load threads for thread-index-mode
>   invalid encoding symbol
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:796:in `load'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:796:in `entry'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:571:in `get_entry'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:200:in `block in build_message'
>   /usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:579:in `synchronize'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:200:in `build_message'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:155:in `block (2 levels) in each_id_by_date'
>   /home/gaute/dev/ruby/sup.git/lib/sup/thread.rb:338:in `call'
>   /home/gaute/dev/ruby/sup.git/lib/sup/thread.rb:338:in `block in load_n_threads'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:155:in `block in each_id_by_date'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:250:in `block in each_id'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:250:in `each'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:250:in `each_id'
>   /home/gaute/dev/ruby/sup.git/lib/sup/index.rb:155:in `each_id_by_date'
>   /home/gaute/dev/ruby/sup.git/lib/sup/thread.rb:334:in `load_n_threads'
>   /home/gaute/dev/ruby/sup.git/lib/sup/modes/thread-index-mode.rb:643:in `load_n_threads'
>   (eval):12:in `load_n_threads'
>   /home/gaute/dev/ruby/sup.git/lib/sup/modes/thread-index-mode.rb:627:in `block in load_n_threads_background'
>   /home/gaute/dev/ruby/sup.git/lib/sup.rb:78:in `block in reporting_thread'

Also perhaps worth mentioning; I get an error on several documents when
doing sup-dump:

failed to dump document 2192065433
failed to dump document 2195211019
failed to dump document 2195211571
failed to dump document 2197009224
failed to dump document 2197023569
failed to dump document 2197023801
failed to dump document 2198792521
failed to dump document 2199089510
failed to dump document 2199602802
failed to dump document 2199602803
failed to dump document 2200333894
failed to dump document 2201147825
failed to dump document 2201629209
failed to dump document 2207757157
failed to dump document 2207760235
failed to dump document 2209183158
failed to dump document 2209239264
failed to dump document 2210514594
failed to dump document 2211271070
failed to dump document 2211437027

Could perhaps be related.

- Gaute

---

From: Gaute Hope <[email-masked]>
Date: Thu, 02 Jun 2011 16:36:04 +0200

Hi,

running latest 'next'. I've tried to experiment a bit with it, but
haven't found a solution. Trying to encode data, or force_encode the
data to UTF-8.

This happens when listing some old mail, so it could possibly be an
issue with data not _stored_ correctly in the first place.

I still haven't figured out a way to handle the exception and still get
the message structure de-serialized. Any suggestions?

Best regards,
Gaute