* [sup-talk] fatal exception: invalid contacts.txt
@ 2008-02-14 21:22 Alan De Smet
2008-02-16 13:15 ` William Morgan
0 siblings, 1 reply; 2+ messages in thread
From: Alan De Smet @ 2008-02-14 21:22 UTC (permalink / raw)
I'm trying to import a bunch of contacts into sup by directly
modifying the .sup/contacts.txt file. Apparently blank lines and
comments are not welcome. If the goals of contacts.txt include
that humans are able to edit it, blank lines and comments are
helpful and it would be nice if they were allowed. If that's
madness, and only software should edit the file, I'd expect an
error message and more graceful exit.
This is sup v0.4, installed this morning via gem. It (and
rubygems) is installed as a user, not root, on a Red Hat
Enterprise Linux 5 machine.
contents of contacts.txt:
> alice: Alice <alice at example.com>
>
> bob: Bob <bob at example.com>
Output:
> [Thu Feb 14 15:17:25 -0600 2008] using character set encoding "UTF-8"
> [Thu Feb 14 15:17:25 -0600 2008] optional 'chronic' library not found (run 'gem install chronic' to install)
> [Thu Feb 14 15:17:25 -0600 2008] locking /u/a/d/adesmet/.sup/lock...
> [Thu Feb 14 15:17:25 -0600 2008] stopped cursing
> [Thu Feb 14 15:17:25 -0600 2008] oh crap, an exception
> [Thu Feb 14 15:17:25 -0600 2008] unlocking /u/a/d/adesmet/.sup/lock...
> ----------------------------------------------------------------
> I'm very sorry. It seems that an error occurred in Sup. Please
> accept my sincere apologies. If you don't mind, please send the
> contents of sup-exception-log.txt and a brief report of the
> circumstances to sup-talk at rubyforge dot orgs so that I might
> address this problem. Thank you!
>
> Sincerely,
> William
> ----------------------------------------------------------------
> --- RuntimeError from thread: main
> can't parse /u/a/d/adesmet/.sup/contacts.txt line "\n"
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:18:in `initialize'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `foreach'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `initialize'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `new'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `start'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/bin/sup:113
> opt/ruby_gem_home/bin/sup:19:in `load'
> opt/ruby_gem_home/bin/sup:19
contents of sup-exception-log.txt:
> --- RuntimeError from thread: main
> can't parse /u/a/d/adesmet/.sup/contacts.txt line "\n"
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:18:in `initialize'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `foreach'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `initialize'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `new'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `start'
> /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/bin/sup:113
> opt/ruby_gem_home/bin/sup:19:in `load'
> opt/ruby_gem_home/bin/sup:19
You get very similar output with a contacts.txt file of:
> alice: Alice <alice at example.com>
> # Bob's a nice guy
> bob: Bob <bob at example.com>
--
Alan De Smet http://www.highprogrammer.com/alan
^ permalink raw reply [flat|nested] 2+ messages in thread
* [sup-talk] fatal exception: invalid contacts.txt
2008-02-14 21:22 [sup-talk] fatal exception: invalid contacts.txt Alan De Smet
@ 2008-02-16 13:15 ` William Morgan
0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2008-02-16 13:15 UTC (permalink / raw)
Reformatted excerpts from Alan De Smet's message of 2008-02-14:
> If the goals of contacts.txt include that humans are able to edit it,
> blank lines and comments are helpful and it would be nice if they were
> allowed.
I agree completely. I'll work on a better parser for this. Patches
welcome, of course!
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-16 13:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-14 21:22 [sup-talk] fatal exception: invalid contacts.txt Alan De Smet
2008-02-16 13:15 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox