Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error creating a new version of a workspace - compilerError: true #2557

Unanswered
davidmuleropino asked this question in Q&A
Discussion options

I'm not able to create a new version of a workspace.
The function doesn't return any error, but the workspace doesn't dissapear and no version is created.
I've tried to use the API Explorer in the Google Page and despite it returns me a status 200, I get in the response "compilerError": true

Can anyone help me here, please?

This is the function:

def create_version(service, workspace, version_name, version_description):
 """Create new version from workspace and verify it"""
 try:
 workspace_path = workspace['path']
 # Split the path to get account_id and container_id
 path_parts = workspace_path.split('/')
 account_id = path_parts[1]
 container_id = path_parts[3]
 response = service.accounts().containers().workspaces().create_version(
 path=workspace_path,
 body={
 'name': version_name,
 'notes': version_description
 }
 ).execute()
 # Check if containerVersion exists in response
 if 'containerVersion' in response:
 version = response['containerVersion']
 version_id = version.get('containerVersionId', 'Unknown')
 print(f"Created new version: {version_id}")
 
 # Short delay to allow GTM to register the version
 time.sleep(2)
 
 return version
 else:
 print("Version creation response did not contain 'containerVersion'")
 return None
 
 except TypeError as error:
 print(f'There was an error in constructing your query: {error}')
 return None
 except Exception as e:
 print(f"Error creating version: {str(e)}")
 print(f"Error type: {type(e)}")
 print(f"Full error details: {repr(e)}")
 return None
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /