Sorry for my laziness :). Actually I didn't know that when running in the interpreter I would get the traceback.

the code is:

import yaml

def load_pref():
    f = open('saleswebservice.conf')
    return yaml.load_document(

>>> import preferences
>>> d = preferences.load_file()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'load_file'
>>> d = preferences.load_pref()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/sales/saleswebservice/", line 21, in load_pref
    return yaml.load_document(
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 31, in load_document
    for document in load(*args, **kwds):
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 41, in __iter__
    while self.resolver.check():
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 25, in check
    return self.composer.check()
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 20, in check
    return not self.parser.check(StreamEndEvent)
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 95, in check
    self.current_event =
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 148, in parse_stream
    DocumentStartToken, DocumentEndToken, StreamEndToken):
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 115, in check
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 163, in fetch_more_tokens
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 768, in scan_to_next_token
    if self.scan_line_break():
  File "/home/sales/lib/python2.4/site-packages/yaml/", line 1401, in scan_line_break
AttributeError: Scanner instance has no attribute 'forward'

It could be an installation problem because I install with --prefix=$HOME

Thanks for the help

On 3/1/06, Clark C. Evans <> wrote:
I'm not sure what the problem is, pop-in on #yaml at
More information would be helpful ;)