Skip to content

wikibase.cloud bot permissions with is_bot #861

@BHare1985

Description

@BHare1985

The following code does not work, it says You do not have the "bot" right, so the action could not be completed. however all the possible bot permissions are enabled on wikibase.cloud

        new_property = wbi.property.new(datatype=datatype)
        
        # Set label and description
        new_property.labels.set(language='en', value=label)
        new_property.descriptions.set(language='en', value=description)
        
        # Write the property to the Wikibase instance with additional parameters
        result = new_property.write(
            summary=f"Created property: {label}",
            is_bot=True,
            allow_anonymous=False
        )

Fix:

        result = new_property.write(
            summary=f"Created property: {label}",
            is_bot=True,
            allow_anonymous=False
        )

to

        result = new_property.write(
            summary=f"Created property: {label}"
        )

The fix was telling the the integrator that it's not a bot (even though it is). Not sure if this is an issue with wikibase.cloud's integration or your tool.

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem right

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions