0

I'm running a bash script that collates and organises files before turning it into a zip. When I run the script, multiple Thunar 'warnings' and 'critials' pop that I have a hard time figuring out what they are about (see image). This occurs while the script is copying over files.

It mentions a Content type loading error for a strangely named file that I can't place. What generates these warnings?

thunar-WARNING **: 16:45:16.720: Content type loading failed for sedVOTg4r: Error when getting information for file /path/to/file/sedVOTg4r : No such file or directory GLib-GIO-CRITICAL **: 16:45:16.722: g_file_info_get_attribute_uint32: assertion 'G_IS_FILE_INFO (info)' failed 

error message

The script looks as follows:

#!/bin/bash subj=$1 outBase=$2 echo $subj echo $outBase subj_site_list=path/to/scripts/subj_site_list.txt ######### make/check dir structure exists ######## outStudy=${outBase}/Leapeuaims_2 if [[ ! -d "${outStudy}" ]] ; then mkdir ${outStudy} fi ## Set matching site collection for the particular subject site=$(awk -v search="$subj" '{gsub(/^[ \t]+|[ \t]+$/, "");} $1 == search {print $2}' "$subj_site_list" | tr -d '\r') echo "${subj} is a ${site} participant" echo if [ "$site" = "University1" ]; then outCentre=${outStudy}/University1 elif [ "$site" = "University2" ]; then outCentre=${outStudy}/University2 elif [ "$site" = "999" ]; then echo ">> site code 999, skipping subject $subj" sed --in-place "/$subj/d" ./logfile.txt echo ">> site code 999, skipping subject $subj" >> logfile.txt echo exit else echo ">> subject $subj not listed; check for withdrawn consent" echo fi echo "site parameter set to $outCentre" echo if [[ ! -d "${outCentre}" ]] ; then mkdir ${outCentre} fi ## Make BOLD folder for preprocessed data BOLD=${outCentre}/BOLD if [[ ! -d "${BOLD}" ]] ; then mkdir ${BOLD} mkdir ${BOLD}/Preprocessed fi ####### Check what subj data exists/mk dirs and copy over/rename as needed per modality ######### indir=/path/to/subject_data/$subj/ echo "Wrapping contents ${indir}" echo #BOLD if ls $indir/BOLD_data/preprocessing/* 1> /dev/null 2>&1; then subjbold=${BOLD}/Preprocessed/${subj} mkdir $subjbold rsdir=${subjbold}/Resting_state mkdir $rsdir echo "adding preprocessed resting state data" cp -r $indir/BOLD_data/preprocessing/* $rsdir/ echo "done" echo else echo ">> no preprocessed data found for $subj" echo sed --in-place "/$subj/d" ./logfile.txt echo "${subj}: no fMRI data found" >> logfile.txt fi 
11
  • It looks as if your script is attempting to copy temporary or non-existent files, as evidenced by: No such file or directory The Object assertions are normal when trying to use an application written for a Desktop Environment in a Terminal Commented Feb 20, 2024 at 19:29
  • Interesting. Nowhere in my script I explicitly copy anything from that directory at all, so where could this behavior come from? Commented Feb 21, 2024 at 13:56
  • Whatever the path id that you blotted out for anonymity + the file sedVOTg4r don't exist at runtime, therefore Thunar cannot find the icon for that file because the file doesn't exist. Commented Feb 21, 2024 at 19:33
  • Can you add the script? Without seeing the script, we can only guess Commented Feb 22, 2024 at 9:24
  • No problem @Vilinkameni, I have added the script, I hope it is readable enough, if not please let know. I guess somewhere along these (temporary?) files like sedVOTg4r are made. I guess, now I see this filename this would be related somehow to the sed --inplace lines? Commented Feb 22, 2024 at 11:48

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.