Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing transformer 'GenerateDocumentation' failed. Verify if correct name or configuration was provided. #715

Open
mikeleppane opened this issue Sep 12, 2024 · 7 comments

Comments

@mikeleppane
Copy link

Hey! I'm getting the following error when trying to run robotidy:

Error: Importing transformer 'GenerateDocumentation' failed. Verify if correct name or configuration was provided.

Versions:

robotidy, version 4.14.0

Robot Framework 7.0.1 (Python 3.11.6 on win32)

This has worked before, but I don't know why this now happens.

@bhirsz
Copy link
Member

bhirsz commented Sep 12, 2024

Do you use it with any specific config? GenerateDocumentation uses jinja so it could be also because of change in the depending library - I would need to check.

The error itself doesn't tell much, I will look into possiblity of printing whole error stack if used with --verbose flag (in the future).

@mikeleppane
Copy link
Author

mikeleppane commented Sep 12, 2024

Yes we have some pre-defined config:

[tool.robotidy]
overwrite = true
skip-tags = true
spacecount = 4
configure = [
    "NormalizeTags:enabled=False",
]

From the lock file:

[[package]]
name = "jinja2"
version = "3.1.4"

@mikeleppane
Copy link
Author

Is there a way to skip this transformer? So that we can circumvent this error?

@bhirsz
Copy link
Member

bhirsz commented Sep 12, 2024

GenerateDocumentation is 'opt in' kind of transformer, if you don't enable it you it shouldn't be included. I wasn't aware you don't use it in the configuration - if robotidy fails even without using it, it may be different issue. I will try to reproduce it.

@mikeleppane
Copy link
Author

Yes, we don't use it. However, I tried explicitly disabling it in the config, but that did not help:

configure = [
    "GenerateDocumentation:enabled=False"
]

@bhirsz
Copy link
Member

bhirsz commented Sep 12, 2024

Can you try to install this version and run it again?

pip install https://github.com/MarketSquare/robotframework-tidy/archive/fix/generatedocumentation_import_error.zip

I only added bit more error logging as I can't reproduce it on my local setup

@mikeleppane
Copy link
Author

Hmm, after reinstalling, it suddenly started working. I need to monitor this closely. I will reassess tomorrow.

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

No branches or pull requests

2 participants