开发者

The problem: found a tab character that violate intendation

./run-bot
Running bot 22496
Error parsing ./shittybot.yml: YAML::XS::Load Error: The problem:

    found a tab character that violate intendation

was found at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 201
        Config::Any::_load('Config::Any', 'HASH(0x8de4708)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 94
        Config::Any::load_files('Config::Any', 'HASH(0x8de4708)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 104
        Config::JFDI::Source::Loader::_load_files('Config::JFDI::Source::Loader=HASH(0x85e1d48)', 'ARRAY(0x8de4f48)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 62
        Config::JFDI::Source::Loader::read('Config::JFDI::Source::Loader=HASH(0x85e1d48)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 153
        Config::JFDI::load('Config::JFDI=HASH(0x85e67c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 140
        Config::JFDI::config('Config::JFDI=HASH(0x85e67c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 131
        Config::JFDI::get('Config::JFDI=HASH(0x85e67c0)') called at bot.pl line 32

How do I fix this?

EDIT: I fixed indentation I think, but now I get this error:

Error parsing ./shittybot.yml: YAML::XS::Load Error: The problem:

    found character that cannot start any token

was found at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 201
        Config::Any::_load('Config::Any', 'HASH(0xa3da738)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 94
        Config::Any::load_files('Config::Any', 'HASH(0xa3da738)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 104
        开发者_Python百科Config::JFDI::Source::Loader::_load_files('Config::JFDI::Source::Loader=HASH(0x9bd7d48)', 'ARRAY(0xa3daf78)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 62
        Config::JFDI::Source::Loader::read('Config::JFDI::Source::Loader=HASH(0x9bd7d48)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 153
        Config::JFDI::load('Config::JFDI=HASH(0x9bdc7c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 140
        Config::JFDI::config('Config::JFDI=HASH(0x9bdc7c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 131
        Config::JFDI::get('Config::JFDI=HASH(0x9bdc7c0)') called at bot.pl line 32


  1. Replace all spaces with tabs
  2. Ensure everything is properly indented.


With your pastebin file.

apv@cassidy[421]~/>perl -MYAML::XS=LoadFile -le 'LoadFile(+shift)' S1tuACcg.txt
             YAML::XS::Load Error: The problem:

    found a tab character that violate intendation

was found at document: 1, line: 8, column: 1
while scanning a plain scalar at line: 7, column: 18    
apv@cassidy[422]~/>perl -lne 'print "TAB!" if /\t/' S1tuACcg.txt
TAB!
TAB!
TAB!
apv@cassidy[423]~/>perl -pi -e 's/\t/        /' S1tuACcg.txt
apv@cassidy[424]~/>perl -MYAML::XS=LoadFile -le \
   'LoadFile(+shift) and print "OK!"' S1tuACcg.txt
OK!

I suspect that if you upgrade your YAML::XS (mine’s 0.34), you’ll see the better error feedback my example shows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜