✈ Pre-Flight checks
🐞 Describe the bug
may have been in 6.0 already
worked without logging a warning in 5.3.1
⌨ Error/Debug Message
WARNING [pyrevit.loader.sessionmgr] Startup script returned non-zero result for extension: MyTools, result: 1
♻️ To Reproduce
No response
⏲️ Expected behavior
No response
🖥️ Hardware and Software Setup (please complete the following information)
master | Branch: "master" | Version: "6.1.0.26047+2255" | Path: "C:\Program Files\pyRevit-Master"
Additional context
import os
import subprocess
from pyrevit import forms, script, EXEC_PARAMS
logger = script.get_logger()
my_config = script.get_config("autoupdate")
if not my_config.get_option("autoupdate", True):
script.exit()
basepath = os.path.dirname(EXEC_PARAMS.command_path)
command = os.path.join(basepath, "MyTools.extension", "dev", "GetMyToolsFromGit.bat")
BAT_COMMAND = "update"
if not os.path.exists(command):
forms.alert(
"Nothing done. Update script not found at:\n{}".format(command),
title="Updater ERROR",
exitscript=True,
)
try:
task = subprocess.Popen(
[command, BAT_COMMAND], stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
out, err = task.communicate()
# Log output if present
if out:
output_text = out.decode("utf-8") if isinstance(out, bytes) else out
logger.info("Script output: {}".format(output_text.strip()))
# Log errors if present
if err:
error_text = err.decode("utf-8") if isinstance(err, bytes) else err
logger.error("Script error: {}".format(error_text.strip()))
# Check return code and provide feedback
if task.returncode != 0:
logger.error(
"Update script failed with return code: {}".format(task.returncode)
)
else:
logger.info("Update script completed successfully.")
except Exception as e:
logger.error("Failed to execute update script: {}".format(str(e)))
✈ Pre-Flight checks
🐞 Describe the bug
may have been in 6.0 already
worked without logging a warning in 5.3.1
⌨ Error/Debug Message
WARNING [pyrevit.loader.sessionmgr] Startup script returned non-zero result for extension: MyTools, result: 1♻️ To Reproduce
No response
⏲️ Expected behavior
No response
🖥️ Hardware and Software Setup (please complete the following information)
Additional context