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
AttributeError: 'function' object has no attribute 'run_cli' #5098
Comments
This is related to #4129. The buildout generates the following code for the entry point: import robot.run
if __name__ == '__main__':
sys.exit(robot.run.run_cli()) Then the above error occurs when running the script. I don't think changing the way the entry point is written would solve the problem. I think what would solve it would be to eliminate the confusion of "run" in both types of import. Of course the buildout could be wrong too, but that doesn't invalidate this issue here. cc @choeger |
humm @choeger' suggestion works. If the entry point is changed to: 'robot = robot:run_cli' The script generated by buildout would be: import robot
if __name__ == '__main__':
sys.exit(robot.run_cli()) and it would work. |
This is due to the The The To resolve the issue, we needed to rename either the module or the function. As I wrote otherwise, |
@pekkaklarck I think it should be renamed because it causes confusion. But if it's going to cause a lot of trouble, could you at least change the entry point to work with buildout? |
Do you mean that in our |
Yes. Remembering that the other entrypoints will require the same change.
The But in any case, changing the module name cannot be lost sight of. Maybe in an 8.0 version? |
I can't run the code below:
But I can run:
This is strange, because depending on the form of the import,
run
can be a function or a module.The text was updated successfully, but these errors were encountered: