Skip to content

Conversation

@msyyc
Copy link
Member

@msyyc msyyc commented Jun 24, 2022

@msyyc msyyc enabled auto-merge (squash) June 24, 2022 02:52
@msyyc msyyc requested a review from BigCat20196 June 24, 2022 02:52
@msyyc msyyc merged commit ed8cb17 into main Jun 24, 2022
@msyyc msyyc deleted the dpg-update-use-global-autorest-version branch June 24, 2022 03:22
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Jun 27, 2022
…into merge_patch

* 'main' of https://github.com/Azure/azure-sdk-for-python: (155 commits)
  {machine learning} || Fix a bug in the code (Azure#24922)
  [CLU] support for AAD + docs (Azure#24960)
  Update dpg version (Azure#24986)
  [Botservice]fix model (Azure#24971)
  [perf] Add pipeline template and storage pipelines (Azure#24894)
  [Storage] Remove client-side encryption code from shared (Azure#24931)
  [EventHubs&ServiceBus] update docker images to internal (Azure#24966)
  Sync eng/common directory with azure-sdk-tools for PR 3481 (Azure#24964)
  [Dpg] update to use global autorest version (Azure#24970)
  [CLU] release updates + fix tests (Azure#24963)
  [Test Proxy] Add method to reset setting customizations (Azure#24952)
  [Storage] Add proxy-supporting test classes (Azure#24937)
  [Confidential Ledger] Enable live testing (Azure#24912)
  fix type of _SansIOHTTPPolicyRunner (Azure#24932)
  Adding SIP routing functionality to PhoneNumbers SDK (Azure#22805)
  [DPG] update quick-start-tool (Azure#24942)
  [formrecognizer] Enable copy model tests (Azure#24917)
  [CLU] remove maxpagesize (Azure#24949)
  Use westus3 for translation live tests (Azure#24947)
  [Storage] Make lease duration tests less flakey (Azure#24930)
  ...
_TEMPLATE_TESTS = Path(__file__).resolve().parent / "template_tests"
_TEMPLATE_SAMPLES = Path(__file__).resolve().parent / "template_samples"
_TEMPLATE_CI = Path(__file__).resolve().parent / "template_ci"
_CONFIG_FILE = Path(__file__).resolve() / "../../../swagger_to_sdk_config_dpg.json"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, line 17, should be ,

_CONFIG_FILE = Path(__file__).resolve().parent / "../../../swagger_to_sdk_config_dpg.json"

parent should be appended. Why? because without adding .parent this points to file main.py, not a folder.

Error Recieved:
Input

python ./scripts/quickstart_tooling_dpg/main.py --output-folder ./sdk/loadtestservice/azure-developer-loadtest --input-file /mnt/c/Users/niveditjain/Desktop/loadtesting.json --security-scope https://loadtest.azure-dev.com/.default --package-name azure-developer-loadtestservice --package-pprint-name "Azure Developer LoadTestService" --client-name LoadTestClient

Output:

INFO:__main__:Build start: azure-developer-loadtestservice
INFO:__main__:Building swagger readme
Traceback (most recent call last):
  File "./scripts/quickstart_tooling_dpg/main.py", line 186, in <module>
    main(**parameters)
  File "./scripts/quickstart_tooling_dpg/main.py", line 126, in main
    build_package(**kwargs)
  File "./scripts/quickstart_tooling_dpg/main.py", line 105, in build_package
    autorest_cmd = f'autorest {swagger_readme} {get_autorest_version()} '
  File "./scripts/quickstart_tooling_dpg/main.py", line 80, in get_autorest_version
    with open(_CONFIG_FILE, 'r') as file_in:
NotADirectoryError: [Errno 20] Not a directory: '/mnt/c/Users/niveditjain/Desktop/azure-sdk/scripts/quickstart_tooling_dpg/main.py/../../../swagger_to_sdk_config_dpg.json'

Error was resolved by rewriting the line 17 as,

 _CONFIG_FILE = Path(__file__).resolve().parent / "../../swagger_to_sdk_config_dpg.json"

@NiveditJain NiveditJain mentioned this pull request Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants