Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Beliagal/qa-report-automation/llms.txt

Use this file to discover all available pages before exploring further.

This page covers the most common issues analysts and developers encounter with the Valoraclick QA Tool and explains exactly how to resolve them. Issues are grouped by area: PDF and export, Google Drive backup, session persistence, and development/environment setup.

Export & PDF Issues

Cause: The Fecha field does not match the DD/MM/YYYY pattern required by _on_export(). Before opening the Save As dialog, the method validates the field against the regular expression ^\d{2}/\d{2}/\d{4}$. If the value fails, a warning dialog is shown and the export is aborted.Fix: Re-enter the date in two-digit day / two-digit month / four-digit year format separated by forward slashes.
❌ Incorrect✅ Correct
7/15/202515/07/2025
2025-07-1515/07/2025
15/7/202515/07/2025
15.07.202515/07/2025
The Fecha entry widget’s key-level validator (_validate_date_input) already blocks non-digit, non-slash characters and enforces a maximum of 10 characters, but it does not enforce the two-digit padding. Always zero-pad single-digit days and months.
Cause: The most common causes are:
  • The selected output path points to a directory that does not exist.
  • The process does not have write permission to the selected folder (e.g. a system folder or a network share with restricted access).
  • Another application has locked the target file.
  • An attached screenshot image is corrupted and cannot be embedded by fpdf2.
Fix:
  1. Choose a different save location — your Desktop or Documents folder are reliable choices.
  2. Verify that the output folder already exists; fpdf2’s output() call does not create missing directories.
  3. If a specific step’s image is suspected, remove the attachment from that step (use RESET TOTAL if necessary) and re-export.
  4. Check that no other application has the PDF open with an exclusive lock.
The full exception message is shown in the Critical Error dialog. Use it to identify the exact failure before attempting a fix.
Cause: PDFService.generate_report() calls os.path.exists(p['img']) before embedding each image. If the file has been moved, renamed, or deleted after being attached to a step, the check fails and the image is silently skipped — no error is raised.Fix:
  1. Do not move or rename attached screenshots between the moment you attach them and the moment you export.
  2. If you need to reorganise files before exporting, re-attach each image to its step using the 📸 Imagen button after moving it to its new location.
  3. Keep all screenshot evidence in a stable folder (e.g. a dedicated C:\TestEvidence\ directory) that will not be cleared during your session.
Attach images using their final destination path from the start. The path stored in the session file is absolute, so images referenced across different machines or drives will not resolve correctly.

Google Drive Backup Issues

Cause: CSVService.export() returned (False, error_message). The most common reasons are:
  • Google Drive for Desktop is not installed, not running, or not mounted as G:\.
  • The shortcut G:\Mi unidad\Informes.lnk does not exist or cannot be resolved by WScript.Shell.
  • _resolve_shortcut() fell back to G:\Mi unidad, but that directory also does not exist and os.makedirs() failed due to permissions.
Fix:
  1. Confirm that Google Drive for Desktop is installed and signed in. Open File Explorer and verify that G:\Mi unidad is accessible.
  2. Navigate to G:\Mi unidad and check that Informes.lnk exists. If it is missing, create a new shortcut pointing to your intended backup folder and name it Informes.lnk.
  3. If Drive is mounted under a different letter (e.g. H:\), update CSVService.shortcut_path and CSVService.fallback_path in services.py to match.
The PDF is always generated regardless of the backup result. The “No disponible” message only indicates that the CSV backup to Drive was skipped — your PDF report is unaffected.
Cause: _resolve_shortcut() successfully resolved Informes.lnk, but the shortcut’s Target path now points to an outdated or incorrect folder — for example, if the target folder was renamed or the shortcut was re-created pointing elsewhere.Fix:
  1. Open File Explorer and navigate to G:\Mi unidad.
  2. Right-click Informes.lnkProperties.
  3. On the Shortcut tab, verify the Target field points to the folder you intend to use as the backup destination.
  4. Click Change Target… (or edit the field directly) to correct it, then click OK.
  5. Run a test export to confirm the CSV now appears in the expected location.
Cause: services.py imports win32com.client at the top of the module. This import is unconditional — it runs on every platform at startup. On macOS and Linux, pywin32 is not available, so the import raises an ImportError before CSVService can even be instantiated.This is expected behavior. win32com is a Windows-only library that provides access to the Windows Scripting Host (WScript.Shell) used by _resolve_shortcut().What still works: The PDF generation logic in PDFService has no Windows-specific dependencies and will function correctly on any platform — provided fpdf2 is installed.Workaround for cross-platform development: Wrap the win32com import in a platform guard in services.py:
import sys
if sys.platform == "win32":
    import win32com.client
Then guard the body of _resolve_shortcut() similarly. This allows the module to be imported on non-Windows systems for testing purposes, while the CSV backup will remain unavailable.

Session Issues

Cause: _load_session() looks for sesion_testing.json in the current working directory at launch time. The session is not restored if:
  • The file does not exist (a clean first launch, or after a successful RESET TOTAL).
  • The file exists but is in a different directory than the one from which the application was launched.
  • The file is present but contains malformed JSON — _load_session() wraps the parse in a bare except Exception: pass, so a corrupted file fails silently.
Fix:
  1. Ensure sesion_testing.json is in the same directory as gui.py (or the compiled executable), and that you launch the application from that directory.
  2. If you suspect the file is corrupted, open it in a text editor and validate the JSON. If it is invalid, delete it and start a fresh session.
  3. If you use a compiled .exe, check that the working directory set in the shortcut or launcher matches the folder containing the session file.
Deleting sesion_testing.json is permanent. All unsaved steps in the session will be lost. Always export to PDF before deleting.
Cause: The RESET TOTAL button was not used. If the application is simply closed without resetting, sesion_testing.json retains the last auto-saved state — including all steps from the completed session. On the next launch, _load_session() restores that old data into the UI.The session file is only deleted by _on_reset(). Simply starting a new session and overwriting fields does not clear steps from pruebas that were added in the previous session.Fix:
  • Always click RESET TOTAL between distinct test sessions. The confirmation dialog prevents accidental resets.
  • If you have already launched the app and noticed old data has been loaded, click RESET TOTAL before adding any new steps.
A good workflow habit: export the PDF at the end of every session, then immediately click RESET TOTAL before closing the application.

Development Issues

Cause: The pywin32 package is not installed in the active Python environment, or a different virtual environment is active than the one where pywin32 was installed.services.py imports win32com.client at module level, so this error occurs on the very first import of the module — before any class or function is called.Fix:
  1. Activate the correct virtual environment:
    # Windows (venv)
    .venv\Scripts\activate
    
  2. Install pywin32:
    pip install pywin32==311
    
  3. On some setups, the post-install script must be run manually to register COM components:
    python Scripts/pywin32_postinstall.py -install
    
  4. Restart your terminal and relaunch the application.
pywin32 version 311 is the version tested with this project. Newer versions are likely compatible but have not been formally verified.
Cause: Running pytest from a subdirectory (e.g. tests/) means Python’s module search path does not include the project root, where models.py, logic.py, and services.py live. Any import models or import logic statement in a test file will raise a ModuleNotFoundError.Fix:Run pytest from the project root directory — the folder that contains gui.py, models.py, logic.py, and services.py:
# From the project root
cd path/to/qa-report-automation
pytest
Alternatively, add a conftest.py at the project root (even an empty one) to help pytest discover the correct root, or configure pythonpath in pyproject.toml:
pyproject.toml
[tool.pytest.ini_options]
pythonpath = ["."]
Tests that import services.py will still fail on non-Windows systems due to the unconditional import win32com.client. Apply the platform guard workaround described in the Backup fails on macOS or Linux section before running the full test suite on non-Windows.

Build docs developers (and LLMs) love