Closed iLLiCiTiT closed 7 months ago
Content of sys.argv does not contain start.py script or ayon-launcher executable.
sys.argv
Reopened https://github.com/ynput/ayon-launcher/pull/94 . Changes in ayon-core were made and this change should be safe to do now.
This change might be done globaly in future PRs, now I'm too scared to do so.
import argparse
def main():
parser = argparse.ArgumentParser(description="Script description") # Add arguments parser.add_argument( "--something", type=str, required=True ) # Parse the arguments args = parser.parse_args() print(args.something)
if name == "main": main()
2. Run commandline to execute python script in AYON context:
.\tools\manage.ps1 run C:\Users\tokejepsen\Desktop\temp.py --something else
Error this PR fixes:
usage: start.py [-h] --something SOMETHING start.py: error: unrecognized arguments: C:\Users\tokejepsen\Desktop\temp.py
Changelog Description
Content of
sys.argv
does not contain start.py script or ayon-launcher executable.Additional information
Reopened https://github.com/ynput/ayon-launcher/pull/94 . Changes in ayon-core were made and this change should be safe to do now.
This change might be done globaly in future PRs, now I'm too scared to do so.
Testing notes:
def main():
Create ArgumentParser object
if name == "main": main()
.\tools\manage.ps1 run C:\Users\tokejepsen\Desktop\temp.py --something else
usage: start.py [-h] --something SOMETHING start.py: error: unrecognized arguments: C:\Users\tokejepsen\Desktop\temp.py