You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
AutoRest code generation utility [cli version: 3.6.1; node: v14.18.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info | AutoRest core version selected from configuration: 3.6.1.
info | Loading AutoRest core 'C:\Users\<USER>\.autorest\@[email protected]\nodemodules\@autorest\core\dist' (3.6.1)
info | Loading AutoRest extension '@autorest/az' (latest->1.8.0)
info | Loading AutoRest extension '@autorest/python' (5.4.0->5.4.0)
info | Loading AutoRest extension '@autorest/clicommon' (0.6.2->0.6.2)
info | Loading AutoRest extension '@autorest/modelerfour' (4.15.421->4.15.421)
Executing: C:\Users\<USER>\.autorest\@[email protected]\node_modules\@autorest\python\venv\Scripts\python.exe -m autorest.jsonrpc.server
warning | IgnoredPropertyNextToRef | Semantic violation: Sibling values alongside $ref will be ignored. See https://github.com/Azure/autorest/blob/main/docs/openapi/howto/$ref-siblings.md for allowed values (components > schemas > ClusterProperties > properties > provisioningState)
keys: [ 'readOnly' ]
- file:///C:/Users/<USER>/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/redisenterprise.json:1346:9
warning | IgnoredPropertyNextToRef | Semantic violation: Sibling values alongside $ref will be ignored. See https://github.com/Azure/autorest/blob/main/docs/openapi/howto/$ref-siblings.md for allowed values (components > schemas > ClusterProperties > properties > resourceState)
keys: [ 'readOnly' ]
- file:///C:/Users/<USER>/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/redisenterprise.json:1351:9
warning | IgnoredPropertyNextToRef | Semantic violation: Sibling values alongside $ref will be ignored. See https://github.com/Azure/autorest/blob/main/docs/openapi/howto/$ref-siblings.md for allowed values (components > schemas > DatabaseProperties > properties > provisioningState)
keys: [ 'readOnly' ]
- file:///C:/Users/<USER>/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/redisenterprise.json:1442:9
warning | IgnoredPropertyNextToRef | Semantic violation: Sibling values alongside $ref will be ignored. See https://github.com/Azure/autorest/blob/main/docs/openapi/howto/$ref-siblings.md for allowed values (components > schemas > DatabaseProperties > properties > resourceState)
keys: [ 'readOnly' ]
- file:///C:/Users/<USER>/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/redisenterprise.json:1447:9
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'ProxyResource' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while. Run with --verbose for more detail.
API Exception: {'type': 'ModuleNotFoundError', 'args': ("No module named 'm2r'",), 'message': "No module named 'm2r'"}
Traceback (most recent call last):
File "C:\Users\<USER>\.autorest\@[email protected]\node_modules\@autorest\python\venv\lib\site-packages\jsonrpc\manager.py", line 113, in _get_responses
result = method(*request.args, **request.kwargs)
File "C:\Users\<USER>\.autorest\@[email protected]\node_modules\@autorest\python\autorest\jsonrpc\server.py", line 35, in Process
from ..m2r import M2R as PluginToLoad
File "C:\Users\<USER>\.autorest\@[email protected]\node_modules\@autorest\python\autorest\m2r\__init__.py", line 11, in <module>
import m2r
ModuleNotFoundError: No module named 'm2r'
warning | cli.auto-parameter-hidden is not true, skip visibility cleaner
info | NOTE: You are currently generating based on track2 SDK
fatal | Error: --az.extensions should not be null!
fatal | Process() cancelled due to failure
Error: Server error
As per discussion with the autorest team, the code generator has pinned older versions of @autorest/python version and @autorest/modelerfour, causing such errors.
debug | [9.23 s] python/m2r - START inputs = 2
debug | [9.23 s] [_main__.Process:32] Autorest called process with plugin_name 'm2r' and session_id: 'session8'
PLUGIN FAILURE: unknown tag !<!AnyObjectSchema> in "code-model-v4.yaml" at line 1148, column 3:
objects:
^, YAMLException: unknown tag !<!AnyObjectSchema> in "code-model-v4.yaml" at line 1148, column 3:
objects:
^
at generateError (C:\Users\<USER>\.autorest\@[email protected]\node_modules\js-yaml\lib\js-yaml\loader.js:167:10)
debug | [15.20 s] Emitting 'python-files' at file:///C:/Users/<USER>/azure-rest-api-specs/specification/redisenterprise/resource-manager/generated/models/_init_.py
debug | [15.20 s] python/codegen/emitter - END [0.01 s][93 MB]
fatal | Process() cancelled due to exception : Plugin cli-prenamer reported failure. / Error: Plugin cli-prenamer reported failure.
at C:\Users\<USER>\.autorest\@[email protected]\node_modules\@autorest\core\dist\src_lib_autorest-corets.js:2792:19
at ScheduleNode (C:\Users\<USER>\.autorest\@[email protected]\node_modules\@autorest\core\dist\src_lib_autorest-corets.js:1338:29)
error | Error: Plugin cli-prenamer reported failure.
error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
debug | [15.20 s] Shutting Down.
debug | [15.20 s] Exiting.
Could someone please help out with this?
The text was updated successfully, but these errors were encountered:
koderjoker
changed the title
Autorest failing with ModuleNotFoundError: No module named No module named 'm2r'
Autorest failing with ModuleNotFoundError: No module named 'm2r'
May 10, 2022
@jitghosh@koderjoker Tried the solution mentioned in #882 and confirmed it worked. Note there will be further dependency issues, google them and install the right version.
Facing issues while trying to generate Azure CLI code
Repro steps:
Output
As per discussion with the autorest team, the code generator has pinned older versions of @autorest/python version and @autorest/modelerfour, causing such errors.
Forcing it to use the latest versions
breaks its functionality with errors such as
Could someone please help out with this?
The text was updated successfully, but these errors were encountered: