Not a valid YAML file

James Cammarata jimi at sngx.net
Tue Jul 19 17:07:21 UTC 2011


I sent in a fix for this last week. Some stuff I was testing got committed
accidently. For the time being you can uncomment the two lines in that
function that I commented out and delete the two relating to json.
On Jul 19, 2011 10:29 AM, "adeadhat" <adeadhat at hotmail.com> wrote:
> Tiny problem:
>
> Request Method: GET
> Request URL: http://192.168.122.141/cobbler_web/
> Django Version: 1.3
> Exception Type: CX
> Exception Value:
>
> '/etc/cobbler/settings is not a valid YAML file'
>
>
> I have everything except this bit right here. This is the Django
> exception I keep receiving. Everything else is up:
> tcp 0 0 127.0.0.1:25151
> 0.0.0.0:* LISTEN
> tcp 0 0 :::80
> :::* LISTEN
>
> [root at localhost cobbler]# cobbler check
> Traceback (most recent call last):
> File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 1964,
> in local_get_cobbler_api_url
> data = simplejson.load(fh)
> File "build/bdist.linux-i686/egg/simplejson/__init__.py", line 329,
> in load
> File "build/bdist.linux-i686/egg/simplejson/__init__.py", line 385,
> in loads
> File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 402, in
> decode
> File "build/bdist.linux-i686/egg/simplejson/decoder.py", line 420, in
> raw_decode
> JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
> Traceback (most recent call last):
> File "/usr/bin/cobbler", line 35, in ?
> sys.exit(app.main())
> File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 541, in main
> cli = BootCLI()
> File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 116, in
> __init__
> self.url_cobbler_api = utils.local_get_cobbler_api_url()
> File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 1968,
> in local_get_cobbler_api_url
> raise CX("/etc/cobbler/settings is not a valid YAML file")
> cobbler.cexceptions.CX: '/etc/cobbler/settings is not a valid YAML file'
>
> utils.py:
>
> def local_get_cobbler_api_url():
> # Load server and http port
> try:
> #fh = open("/etc/cobbler/settings")
> fh = open("/etc/cobbler/settings.json")
>
> Any suggestions?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://fedorahosted.org/pipermail/cobbler/attachments/20110719/9e2ed0ff/attachment.html 


More information about the cobbler mailing list