# Troubleshoot

#### 💻 Script-Level Debugging (`>_` Terminal)

Every script you run provides a live terminal output tab (`>_`) to help you debug what's going wrong.

**How to Use the `>_` Terminal Tab**

* ✅ **Real-time logs** show `print()` output, errors, and any runtime feedback.
* ❌ **Syntax or import errors** are captured here immediately.
* 🧠 Tip: Add `print(variable)` at key points to understand your script's behaviour.
* 🪵 Logs are ephemeral and cleared when you close or re-run a script.

**Example error message:**

```python
Traceback (most recent call last):
  File "main.py", line 14, in <module>
    do_something()
NameError: name 'do_something' is not defined
```

→ This means `do_something()` was used but not declared. Check for typos or missing imports.

***

#### ⚠️ Common Config Errors (YAML)

Misformatted YAML is one of the most common reasons scripts fail to load.

**Key Points to Check:**

* **Only one `inputs:` key** at the top level. Define all input fields under this single array.

❌ Incorrect:

```yaml
inputs:
  - id: foo
inputs:
  - id: bar
```

✅ Correct:

```yaml
inputs:
  - id: foo
  - id: bar
```

* **Correct indentation** is crucial. <mark style="background-color:yellow;">**YAML is space-sensitive**</mark> and breaks easily with tabs or misaligned lines.
* **Short strings** can be written in quotation marks:

```yaml
script_description: "Merge multiple Excel invoice files"
```

* **Long strings** should be broken up using block syntax:

```yaml
script_description: |
  Automatically merge multiple Excel invoice files 
  into a single consolidated report, summarising totals 
  and highlighting discrepancies.
```

* **Dependencies** must be explicitly listed in the`yaml`. Missing dependencies will crash the script.

```yaml
pandas==2.3.4
openpyxl
```

* **Incorrect versions** can cause bugs. Always specify known-working versions.

***

#### ⚙️ Global System Troubleshooting

In the top-right corner, the **Settings drawer** (`⋮ > Settings`) offers global tools that affect all scripts and users on your account.

**Key Tools in Settings**

* 🧹 **Clear Cache**\
  Unloads unused Python environments and dependencies.\
  Useful if things break after changing the `yaml`.
* 📦 **System Update**\
  Ensures you're running the latest version of the platform.\
  Fixes bugs, improves performance, and adds new features.
* 📧 **Change Email**\
  Updates your sign-in address. We'll send a verification link.
* 🔥 **Delete Account**\
  DANGER ZONE: This is permanent. Your scripts and history will be gone forever.

***

#### 🙋‍♂️ Still stuck?

* 📖 [Documentation](https://www.gromet.tech/docs)
* 🌐 [Website](https://www.gromet.tech)
* 📬 Email: <support@gromet.tech>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gromet.gitbook.io/docs/basics/troubleshoot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
