robotframework / RIDE

Test data editor for Robot Framework
Apache License 2.0
964 stars 379 forks source link

Library import shows red #2634

Closed manojpaul8 closed 11 months ago

manojpaul8 commented 1 year ago

RIDE Version: v2.0.6

Python Interpreter Version: 3.10

Operating System and Its Version: Windows 10

We have created the team's repository as a Python package in the form of a .whl file. However, when we attempt to import files from the Python package, the library imports appear in red.

Please note that despite the red coloring, importing actually works as expected. There are no issues when running the scripts. The red color indication can be confusing to users, as it might suggest a problem that does not exist.

image

manojpaul8 commented 1 year ago

Quick Update:

This Import issue is turning out to be a serious problem for us.

Import does not work on some PCs and user needs to re-import few times until they do not see the error. How many times we need to re-import varies from PC to PC.

Please prioritize this ticket as we are waiting for this fix.

HelioGuilherme66 commented 1 year ago

@manojpaul8 If we don't have logs indicating why the import failed, we can't do anything about this. Sometimes it takes a bit of time for the library clear the red color (and may need to move between Tabs, Editor, Run, or Test Cases). Also if your library does not have proper documentation, it will show red, because it failed to import keywords documentation. Your users should know these "issues", and may continue to work, since the Run of the tests work as expected.

JFoederer commented 1 year ago

You can find more details about the failure in RIDE's logging. Best is to check this directly after RIDE startup: image

Most common reason for this type of issue where the library shows red in the editor, but the tests do run, is when you have unresolved dependencies in either the import of the library files or the __init__ of your library class.

If you open a regular Python prompt and you try to import that same library from there, do you see the same error as in the RIDE log?

HelioGuilherme66 commented 11 months ago

Closing because (OR statements):