Discussions of development and use of the Sup email client
 help / color / mirror / Atom feed
* undefined method `[]'
@ 2014-07-18 21:34 Alex P
  2014-07-18 22:00 ` Alex P
  0 siblings, 1 reply; 3+ messages in thread
From: Alex P @ 2014-07-18 21:34 UTC (permalink / raw)
  To: supmua


[-- Attachment #1.1: Type: text/plain, Size: 1254 bytes --]

Hi all,

I am changing distro and when I tried to sup-import-dump from my previous 
dump it crashed with 

asdf@bmsmail2.ieee.org unchanged
Changing flags for asdf@gmail.com from 'sent inbox' to 'inbox'
[2014-07-18 23:27:55 +0200] Flushing Xapian updates to disk. This may take 
a while...
/var/lib/gems/1.9.1/gems/sup-0.19.0/lib/sup/index.rb:141:in 
`update_message_state': undefined method `[]' for 
#<Redwood::Message:0x00000001786d78> (NoMethodError)
from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:85:in `block 
in <top (required)>'
from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:55:in `foreach'
from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:55:in `<top 
(required)>'
from /usr/local/bin/sup-import-dump:23:in `load'
from /usr/local/bin/sup-import-dump:23:in `<main>'


As far as I can tell the problem is that there is no such method/operator 
[] for the mail object at index.rb:141 which is passed 
from sup-import-dump:85 
It happens only if I am not dry-running and there is a label to be changed. 
Unfortunately I am not familiar with ruby so I can't really debug it. Any 
hints on
how to solve it?

My previous mails appear in the inbox now and seam to be sync to the 
maildir properly.  

Best,
Alex

[-- Attachment #1.2: Type: text/html, Size: 1860 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: undefined method `[]'
  2014-07-18 21:34 undefined method `[]' Alex P
@ 2014-07-18 22:00 ` Alex P
  2014-07-28 10:32   ` [sup] " Gaute Hope
  0 siblings, 1 reply; 3+ messages in thread
From: Alex P @ 2014-07-18 22:00 UTC (permalink / raw)
  To: supmua


[-- Attachment #1.1: Type: text/plain, Size: 1697 bytes --]

Hi suppers,

I changed the sup-import-dump:85 from index.update_message_state to 
index.update_message (since
with some `puts m.methods` I figured out that I had a message object and 
not a tree(?) object) and the problem
seams to be resolved. I am not sure if it is the proper way to do it 
though...

Best,
Alex


On Friday, July 18, 2014 11:34:16 PM UTC+2, Alex P wrote:
>
> Hi all,
>
> I am changing distro and when I tried to sup-import-dump from my previous 
> dump it crashed with 
>
> asdf@bmsmail2.ieee.org unchanged
> Changing flags for asdf@gmail.com from 'sent inbox' to 'inbox'
> [2014-07-18 23:27:55 +0200] Flushing Xapian updates to disk. This may take 
> a while...
> /var/lib/gems/1.9.1/gems/sup-0.19.0/lib/sup/index.rb:141:in 
> `update_message_state': undefined method `[]' for 
> #<Redwood::Message:0x00000001786d78> (NoMethodError)
> from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:85:in `block 
> in <top (required)>'
> from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:55:in 
> `foreach'
> from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:55:in `<top 
> (required)>'
> from /usr/local/bin/sup-import-dump:23:in `load'
> from /usr/local/bin/sup-import-dump:23:in `<main>'
>
>
> As far as I can tell the problem is that there is no such method/operator 
> [] for the mail object at index.rb:141 which is passed 
> from sup-import-dump:85 
> It happens only if I am not dry-running and there is a label to be 
> changed. Unfortunately I am not familiar with ruby so I can't really debug 
> it. Any hints on
> how to solve it?
>
> My previous mails appear in the inbox now and seam to be sync to the 
> maildir properly.  
>
> Best,
> Alex
>

[-- Attachment #1.2: Type: text/html, Size: 2773 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sup] Re: undefined method `[]'
  2014-07-18 22:00 ` Alex P
@ 2014-07-28 10:32   ` Gaute Hope
  0 siblings, 0 replies; 3+ messages in thread
From: Gaute Hope @ 2014-07-28 10:32 UTC (permalink / raw)
  To: supmua

[-- Attachment #1: Type: text/plain, Size: 2814 bytes --]

Hi, I think this is because the update methods now need an array as input
with the first element being the message object, and the second being true
or false of whether the message object should be synced back. This was
introduced with the sync back features. You can probably set it to false
for the import dump stuff. Please check index.rb though.


On Sat, Jul 19, 2014 at 12:00 AM, Alex P <cbm.mailbox@gmail.com> wrote:

> Hi suppers,
>
> I changed the sup-import-dump:85 from index.update_message_state to
> index.update_message (since
> with some `puts m.methods` I figured out that I had a message object and
> not a tree(?) object) and the problem
> seams to be resolved. I am not sure if it is the proper way to do it
> though...
>
> Best,
> Alex
>
>
> On Friday, July 18, 2014 11:34:16 PM UTC+2, Alex P wrote:
>>
>> Hi all,
>>
>> I am changing distro and when I tried to sup-import-dump from my previous
>> dump it crashed with
>>
>> asdf@bmsmail2.ieee.org unchanged
>> Changing flags for asdf@gmail.com from 'sent inbox' to 'inbox'
>> [2014-07-18 23:27:55 +0200] Flushing Xapian updates to disk. This may
>> take a while...
>> /var/lib/gems/1.9.1/gems/sup-0.19.0/lib/sup/index.rb:141:in
>> `update_message_state': undefined method `[]' for #<Redwood::Message:0x00000001786d78>
>> (NoMethodError)
>> from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:85:in
>> `block in <top (required)>'
>> from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:55:in
>> `foreach'
>> from /var/lib/gems/1.9.1/gems/sup-0.19.0/bin/sup-import-dump:55:in `<top
>> (required)>'
>> from /usr/local/bin/sup-import-dump:23:in `load'
>> from /usr/local/bin/sup-import-dump:23:in `<main>'
>>
>>
>> As far as I can tell the problem is that there is no such method/operator
>> [] for the mail object at index.rb:141 which is passed
>> from sup-import-dump:85
>> It happens only if I am not dry-running and there is a label to be
>> changed. Unfortunately I am not familiar with ruby so I can't really debug
>> it. Any hints on
>> how to solve it?
>>
>> My previous mails appear in the inbox now and seam to be sync to the
>> maildir properly.
>>
>> Best,
>> Alex
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "The Sup email client" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to supmua+unsubscribe@googlegroups.com.
> To post to this group, send email to supmua@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/supmua/d5a5a978-1677-4e90-b956-97a151c4866a%40googlegroups.com
> <https://groups.google.com/d/msgid/supmua/d5a5a978-1677-4e90-b956-97a151c4866a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 4373 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-28 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 21:34 undefined method `[]' Alex P
2014-07-18 22:00 ` Alex P
2014-07-28 10:32   ` [sup] " Gaute Hope

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox