Error in Pfind

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
User avatar
AntonioPt
Posts: 177
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 81 times
Been thanked: 33 times

Error in Pfind

Post by AntonioPt »

I found this error in pfind and the solution I found was to delete the following folder /root/.pfilesearch

Gonna check more close the full script of pfind to see what i can come up with

Attachments
Screenshot(16).png
Screenshot(16).png (79.87 KiB) Viewed 625 times

Why astronauts use Linux
Because you can't open windows in space

User avatar
bigpup
Moderator
Posts: 6431
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 767 times
Been thanked: 1331 times

Re: Pfind

Post by bigpup »

What version of Pfind?

What specific Puppy version?

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
AntonioPt
Posts: 177
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 81 times
Been thanked: 33 times

Re: Pfind

Post by AntonioPt »

bigpup wrote: Fri Jan 21, 2022 8:37 pm

What version of Pfind?

What specific Puppy version?

Was in FossaPup64, pfind version 6.3 but buster and Bionic both use the some code in the path usr/local/pfind.
i dont know yet what happen but im guessing puupy went down just like that and damage some files in /root/.filesearch but not 100% sure yet

Why astronauts use Linux
Because you can't open windows in space

User avatar
MochiMoppel
Posts: 1139
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 373 times

Re: Pfind

Post by MochiMoppel »

AntonioPt wrote: Sat Jan 22, 2022 8:46 am

i dont know yet what happen but im guessing puupy went down just like that and damage some files in /root/.filesearch

Unlikely.
The error messages mean that the variables $RADIOBUTTON_PATH_PUPPY , $RADIOBUTTON_PATH_MNT etc. are empty.
This triggers
a) a bash syntax error ./pfind: line 111: [: =: unary operator expected
because bash "sees" [ = true ] ,i.e. an operation with only one operand (true). For such operations a handful of unary operators can be used, e.g. '!' , but not '=' , which can only be used in binary operations.
and
b) a gtkdialog error "near token '</default>'" because gtkdialog doesn't allow empty defaults.

Somehow in your case Pfind can't properly execute line 524:

Code: Select all

[ -s $HOME/.pfind/pfindrc ] && . $HOME/.pfind/pfindrc #read config file

It is supposed to read the config file $HOME/.pfind/pfindrc where the values for the variables are stored, but either the file doesn't exist , the values inside the files are invalid, your $HOME variable points to the wrong folder or .... you'll find out.

In any case I can replicate your errors when I comment out line 524.

User avatar
AntonioPt
Posts: 177
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 81 times
Been thanked: 33 times

Re: Pfind

Post by AntonioPt »

MochiMoppel wrote: Sat Jan 22, 2022 12:09 pm
AntonioPt wrote: Sat Jan 22, 2022 8:46 am

i dont know yet what happen but im guessing puupy went down just like that and damage some files in /root/.filesearch

Unlikely.
The error messages mean that the variables $RADIOBUTTON_PATH_PUPPY , $RADIOBUTTON_PATH_MNT etc. are empty.
This triggers
a) a bash syntax error ./pfind: line 111: [: =: unary operator expected
because bash "sees" [ = true ] ,i.e. an operation with only one operand (true). For such operations a handful of unary operators can be used, e.g. '!' , but not '=' , which can only be used in binary operations.
and
b) a gtkdialog error "near token '</default>'" because gtkdialog doesn't allow empty defaults.

Somehow in your case Pfind can't properly execute line 524:

Code: Select all

[ -s $HOME/.pfind/pfindrc ] && . $HOME/.pfind/pfindrc #read config file

It is supposed to read the config file $HOME/.pfind/pfindrc where the values for the variables are stored, but either the file doesn't exist , the values inside the files are invalid, your $HOME variable points to the wrong folder or .... you'll find out.

In any case I can replicate your errors when I comment out line 524.

Thxx for you replay i just check my old pc where i got this issue. I have saved the 2 folder that pfind creates in Root and i realize that the issue is the temp script called pfindrc in /root/.pfind but of course the main script pfind need to do some updates anyway to avoid this error again in the future.
gonna see what i can come up with :)

gonna share pfindrc the good one and the damage

Attachments
pfindrc.7z
(876 Bytes) Downloaded 30 times

Why astronauts use Linux
Because you can't open windows in space

User avatar
MochiMoppel
Posts: 1139
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 373 times

Re: Pfind

Post by MochiMoppel »

AntonioPt wrote: Sun Jan 23, 2022 9:15 pm

the main script pfind need to do some updates anyway to avoid this error again in the future.

Unless you can describe the steps that lead to such "bad" config file so that anyone can reproduce the errors it will be difficult to fix the code. The 2 errors you encountered can certainly be fixed by adding obviously missing quotation marks but I'm afraid that this is not all that needs to be done.

User avatar
AntonioPt
Posts: 177
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 81 times
Been thanked: 33 times

Re: Pfind

Post by AntonioPt »

MochiMoppel wrote: Mon Jan 24, 2022 1:11 am
AntonioPt wrote: Sun Jan 23, 2022 9:15 pm

the main script pfind need to do some updates anyway to avoid this error again in the future.

Unless you can describe the steps that lead to such "bad" config file so that anyone can reproduce the errors it will be difficult to fix the code. The 2 errors you encountered can certainly be fixed by adding obviously missing quotation marks but I'm afraid that this is not all that needs to be done.

What Really happen i dont remember but i guessing i made a force sutdown :D, all i can tell is that i deleted the folder /root/.pfind and pfind start working again.
but first i made a backup of the folder /root/.pfind and today i analize both folders and notice that the file pfindrc add difrent size and missing code meaning that when this happen pfindrc or didnt wrote full code again or.... i manager for now to add a function to write full pfindrc everytime pfind is lunch.

$PROGPATH/func -write_config <-- add this in pfind script

[ $RADIOBUTTON_PATH_PUPPY = true ] && echo "$PATH_PUPPY" > $HOME/.pfilesearch/tmp/SEARCHPATHS
[ $RADIOBUTTON_PATH_MNT = true ] && echo "$PATH_MNT" > $HOME/.pfilesearch/tmp/SEARCHPATHS
[ $RADIOBUTTON_PATH_CURRENT = true ] && echo "$CURDIR" > $HOME/.pfilesearch/tmp/SEARCHPATHS
[ $RADIOBUTTON_PATH_ALL = true ] && echo '/' > $HOME/.pfilesearch/tmp/SEARCHPATHS

Why astronauts use Linux
Because you can't open windows in space

Post Reply

Return to “Bug Reports”