Ticket #480 (closed defect: fixed)
Custom style setting fails to load on padre restart
| Reported by: | bricas | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Syntax Highlighting | Version: | 0.41 |
| Keywords: | Cc: |
Description
If I use a custom style, then restart padre, I get the following error message:
Failed to load YAML document from '/usr/local/share/perl/5.10.0/auto/share/dist/Padre/styles/mine.yml' at /usr/local/share/perl/5.10.0/Padre/Wx/Editor.pm line 101
It appears that Padre thinks it was a shared style rather than one of my own.
Change History
comment:2 Changed 2 years ago by bricas
Yes.
With Padre 0.84:
Failed to load YAML document from '/usr/local/share/perl/5.10.1/auto/share/dist/Padre/styles/mine.yml' at /usr/local/share/perl/5.10.1/Padre/Wx/Editor.pm line 198
comment:3 Changed 2 years ago by szabgab
The code at line 198 looks like this:
eval { $tdata = YAML::Tiny::LoadFile($file); };
if ($@) {
warn $@;
}
So I don't understand it.
Are you sure that file is a valid YAML file?
Besides the path in the error message points to the directory where the standard styles can be found. The personal styles should be in ~/.padre/styles/
comment:4 Changed 2 years ago by bricas
Steps to reproduce it:
- Copy an existing style to your local style dir as mine.yml. For me, this was: cp /usr/local/share/perl/5.10.1/auto/share/dist/Padre/styles/default.yml ~/.local/share/.padre/styles/mine.yml
- Start Padre
- Under View->Style select "mine"
- Close Padre
- Start Padre (from the command-prompt so you can see the warning)

Is this still happening in 0.84?