Tutorial Troubleshooting QGIS: Difference between revisions

Content deleted Content added
No edit summary
 
(62 intermediate revisions by 5 users not shown)
Line 7:
When changes are made in the control files and the files are not saved, errors occur.
<ol>
<li>Check that all simulation control files and batch files are saved ([[File:Notepad Saved Icon.png]]). A red icon indicates that there are unsaved changes in the file:<br>
<br>
[[File:Troubleshooting CommonErrors 01Troubleshooting_CommonErrors_01a.png]]<br>
<br>
<li>Use the 'Save All' tool to save all unsaved control files:<br>
<br>
[[File:Animation Troubleshooting CommonErrors 12Troubleshooting_CommonErrors_12.gifpng]]<br>
<br>
</ol>
Line 20:
When changes are made in GIS layers and the layers are not saved, errors occur.
<ol>
<li>Check that all GIS input layers have beenare saved. If the 'Save Layer Edits' icon is available ([[File:QGIS UnsavedEdits.png]]), there are unsaved edits in the layer.
<li>A pencil icon on the layer ([[File:QGIS ToggleEditing.png]]) indicates that the layer is still editable and may contain unsaved edits. It is recommended to always turn off editing for all input layers. <br>
<br>
{{Video|name=Animation_Troubleshooting_CommonErrors_02c.mp4}}<br>
[[File:Animation Troubleshooting CommonErrors 02a.gif]]<br>
<br>
</ol>
 
===TUFLOW Syntax Rules===
Control files must use a double equal sign when referencing (==). When a single equal sign has(=) beenis used, the endsimulation ofstops thewith TLF shows theand error andat whichthe lineend containsof the error.tlf file:<br>
<br>
<ol>
[[File:Troubleshooting CommonErrors 15.png]]<br>
[[File:Troubleshooting_CommonErrors_16b.png]]<br>
<br>
[[File:Troubleshooting_CommonErrors_15a.png]]<br>
</ol>
<br>
 
===TyposSpelling Mistakes in Control Files===
 
TyposSpelling mistakes in control files are a common, with the majoritymistake, resulting in a 'does not exist' pop up message:<br>
<br>
<ol>
[[File:Troubleshooting CommonErrors 03.png]]<br>
[[File:Troubleshooting_CommonErrors_03b.png]]<br>
</ol>
<br>
To fix the reference:
<ol>
<li>The file that cannot by found is '''M02_01M01_01.tgc'''. Go to the folder where the file should be (in this example the '''TUFLOW\model''' folder).
<li>The file referenced should be M02_M01_'''001'''.tgc.
<li>Update the reference in the TCF and confirm the file can now be found by right clicking on the file and selecting open. <br>
<br>
{{Video|name=Animation_Troubleshooting_CommonErrors_04a.mp4|width=1128}}<br>
[[File:Animation Troubleshooting CommonErrors 04.gif]]<br>
<br>
</ol>
 
===TyposSpelling Mistakes in Input Layers===
TyposSpelling mistakes in input layers are also a common mistake, resulting in a 'does not exist' pop up message:<br>
<br>
<ol>
[[File:Troubleshooting CommonErrors 13.png]]<br>
[[File:Troubleshooting_CommonErrors_13a.png]]<br>
</ol>
<br>
To fix the reference:
<ol>
<li>The layer that cannot by found is '''1d_nwk_M03_culverts_001_L2d_bc_M03_culverts_001_P.shp'''. Go to the folder where the file should be (in this example the '''TUFLOW\model\gis''' folder).
<li>The layer has a spelling mistake 'culvrtsculvets'.
<li>UseIn QGIS use the 'Increment Selected Layer' tool to save the file with the correct name.<br>
Note: The tool will automatically incrementincrements a number if it is at the end of the file name.<br>
<br>
{{Video|name=Animation_Troubleshooting_CommonErrors_14b.mp4|width=1217}}<br>
[[File:Animation Troubleshooting CommonErrors 14.gif]]<br>
</ol>
<br>
 
===TCF does not exist===
Typos or spaces in the TCF name result in a 'does not exist' message in the console window:
<ol>
<li>Check the name of the TCF is referenced correctly in the batch file.
<li>Right click on the TCF in the batch file, select 'Open File' to make sure it can be opened.<br>
<li>Example of incorrect TCF name missing an underscore:<br>
<br>
[[File:Animation Troubleshooting CommonErrors 02a19.gifpng]]<br>
<br>
[[File:Troubleshooting_CommonErrors_20a.png]]<br>
<br>
<li>Example of using space in the TCF name causing TUFLOW to look for a TCF name ending with the first space:<br>
<br>
[[File:Troubleshooting_CommonErrors_17a.png]]<br>
<br>
</ol>
 
===Ambiguous Command===
TUFLOW control files are command driven text files. The commands must be in the format and location TUFLOW is expecting. The <u>[https://docs.tuflow.com/classic-hpc/manual/latest/ TUFLOW Manual]</u> lists all the available commands and specifies which TUFLOW control file each command belongs to.<br>
<ol>
<li>Example of a typo in the 'BC Control File ==' command: <br>
<br>
[[File:Troubleshooting_CommonErrors_18b.png]]<br>
<br>
<li>Example of 'Map Output Data Types ==' command entered into TGC instead of TCF: <br>
<br>
[[File:Troubleshooting_CommonErrors_21b.png]]<br>
</ol>
<br>
 
===Editing File Extension===
When creating a control file from a .txt file, the file extension should be edited to reflect the control file type, such as .tgc, .tbc or .tcf. If the file extensions are hidden in Windows File Explorer, the intended changes to the file extension may be applied to the file name rather than the extension. This could result in control files being referenced incorrectly, which may cause the error message [[TUFLOW_Message_0008 | ERROR 0008]] - <filename> cannot be found.
 
To edit file extensions correctly, ensure file extensions are displayed by enabling the following option within Windows File Explorer:
 
<b> Windows 10 </b> <br>
<ol>[[File:File Ext Win10.png]]</ol>
 
 
<b> Windows 11 </b><br>
<ol>[[File:File Ext Win11.png]]</ol>
 
=Troubleshooting Steps=
=== DOSSimulation Console Window Flashes and Disappears ===
When a batch file hasis beendouble clicked and athe DOSsimulation console window flashes up and disappears the problem might be in the filepath of the TUFLOW executable or incorrect syntax:
<ol>
<li>Check the location of the TUFLOW executable. Rightcan clickbe onfound the .exe fromwith the batchspecified filefilepath and(absolute ensureor that the executable can be found and openrelative).
<li>Double click the executable, this performs a licence check and console window appears. If it doesn't, move the executable to a location where it is permitted to run. Some locations on C drive might be restricted for some users preventing to execute the simulation.
<li>Check the location of the TCF. Right click on the TCF from the batch file and ensure that the file can be found and open.
<li>BatchTUFLOW filesdoesn't dorun notfrom currentlya batch file if the filepaths are specified supportas UNC paths. The folder with both, the executable hasand tothe model, must be opened with a mapped drive. Type "net use <drive>: \\server_name\share_name" in the command line to map desiredthe drivedrives.
<li>If using environment variable 'set exe', confirm there are no spaces surrounding the equals sign (e.g. set exe="..\..\..\..\exe\20202023-1003-ADAA\TUFLOW_iSP_w64.exe").
<li>Check where the model and executable are located. We recommend to '''not''' use the C drive or an external hard drive.
<li>Write 'pause' at the end of the script., Re-runrerun the batch file and the DOSconsole window remains,should remain givingopen someproviding more information. In the below example, the file path to the TUFLOW exe is incorrect:<br>
<li>Batch files do not currently support UNC paths. The folder with the executable has to be opened with a mapped drive. Type "net use <drive>: \\server_name\share_name" in the command line to map desired drive.
<li>Write 'pause' at the end of the script. Re-run the batch file and the DOS window remains, giving some more information. In the below example, the file path to the TUFLOW exe is incorrect:<br>
<br>
{{Video|name=Animation_Troubleshooting_CommonErrors_05b.mp4|width=1124}}<br>
[[File:Animation Troubleshooting CommonErrors 05a.gif]]<br>
<br>
</ol>
 
=== _ TUFLOW Simulations (*.log) ===
The log file contains brief overview of the simulation:
To confirm the simulation has finished:
<ol>
<li>Navigate to the '''TUFLOW\runs''' folder and open the '''_ TUFLOW Simulations.log''' in a text editor.
<li>Confirm if the simulation has 'Started' and 'Finished' line.
<li>If there is no log file, see <u>[[Draft_TroubleshootingTutorial_Troubleshooting_QGIS#DOS_Window_Flashes_and_DisappearsSimulation Console Window Flashes and Disappears | here]]</u>.
</ol>
 
=== TUFLOW Log File (*.tlf) ===
The .tlf file contains information on the model run status and any error messages:
Open the TUFLOW log file (*.tlf) and confirm at the bottom of the file, that the model run finished successfully by observing "Simulation FINISHED". If the simulation has not finished:
<ol>
<li>Navigate to the '''TUFLOW\runs\log''' folder and open the '''.tlf''' file in a text editor.<br>
<li>Scroll to the bottom of the TLF, work from the bottom up to review any error, check or warning messages. If no error messages appear and the last line shows 'Sending initialisation data to HPC...' see <u>[[Tutorial_Troubleshooting_QGIS#HPC_TUFLOW_Log_File_.28.2Ahpc.tlf.29 | HPC TUFLOW Log File]]</u>.
Open<li>Scroll the TUFLOW log file (*.tlf) and confirm atto the bottom ofto the file, thatconfirm the model run finished successfully by observing "Simulation FINISHED". If the simulation has not finished:
<li>Review the Error number, open the link provided in a web browser and read through the description and suggestions:<br>
<li>If not, search from the bottom up for any error, warning or check messages.
<li>Review the Errorerror number, open the link provided in a web browser and read through the description and suggestions:<br>
<br>
{{Video|name=Animation_Troubleshooting_CommonErrors_07b.mp4|width=1265}}<br>
[[File:Animation Troubleshooting CommonErrors 07a.gif]]<br>
<br>
<li>Open the .qgs workspace in QGIS from the '''TUFLOW\runs\log''' folder.
<li>Click 'Apply TUFLOW StylingStyles to All Layers'.
<li>Zoom in to the location of any error messages, turn on labelling to view the error. <br>
<li>In this example the 2d_bc SX point isn't snapped to the 1d_nwk culvert.<br>
<br>
{{Video|name=Animation_Troubleshooting_CommonErrors_08b.mp4|width=1217}}<br>
[[File:Animation Troubleshooting CommonErrors 08a.gif]]<br>
<br>
<li>ScrollIf tono theerror bottommessages ofappear the TLF, work fromin the bottom up to review any error, check or warning messages. If no error messages appeartlf and the last line shows 'Sending initialisation data to HPC...' see <u>[[Tutorial_Troubleshooting_QGIS#HPC_TUFLOW_Log_File_.28.2Ahpc2A.hpc.tlf.29 | HPC TUFLOW Log File]]</u> below.<br>
<br>
</ol>
 
=== HPC TUFLOW Log File (*.hpc.tlf) ===
IfThe there.hpc.tlf isfile nocontains error messagemessages innot therecorded TLF andin the last lines.tlf showfile:<br>
<ol>
<li>Navigate to the '''TUFLOW\runs\log''' folder and open the '''.hpc.tlf''' file in a text editor. If the last lines shows:<br>
<br>
[[File:Troubleshooting CommonErrors 11Troubleshooting_CommonErrors_11a.png]]<br>
<br>
<li>The model has beenis set up to run on GPU and there is no GPU available, or
<ol>
<li>The model has been set up to run on GPU and there is no GPU available, or
<li>The GPU needs a driver update, for more information see <u>[https://wiki.tuflow.com/index.php?title=GPU_Setup Update GPU Driver]</u>.
</ol>
Line 116 ⟶ 171:
 
=Conclusion=
If the above tips do not assist in fixing the error, email [mailto:support@tuflow.com support@tuflow.com].
 
<br>