Skip to content

Taking log plugin into use failed #2197

Description

@CMM-Guru

Environment:
Windows 10 Enterprise (1909)
Python 3.8.2 x64
Robot Framework 3.2.1
Robot Framework AutoItLibrary 1.2.5
Robot Framework RIDE 2.0b1.dev1
WMI 1.5.1
wxPython 4.0.7.post2

When launching RIDE via the desktop shortcut with the command: "C:\Program Files\Python38\pythonw.exe" -c "from robotide import main; main()"

A message dialog is displayed that Taking log plugin into use failed. If you click OK, RIDE opens.

Better information is available from the plugin manager inside RIDE.
Log error 1
Log error 2

If anybody needs more details or logging (tell me where to find it), let me know. RIDE runs. It's just an annoying prompt every time you launch.

Activity

  1. HelioGuilherme66 commented on May 11, 2020

    @HelioGuilherme66
    Member

    Once we had that issue, but it was fixed. I suspect that you don't have defined the environment variables TEMP or TMP.
    Other things you can experiment, is to change the launching command to:
    "C:\Program Files\Python38\python.exe" -c "from robotide import main; main()"
    (This will open also a command window.)

    or

    "C:\Program Files\Python38\pythonw.exe" -m robotide.__init__

  2. added
    pending
    on May 11, 2020
  3. CMM-Guru commented on May 11, 2020

    @CMM-Guru
    Author
  4. added
    analyze
    and removed
    pending
    on May 11, 2020
  5. HelioGuilherme66 commented on May 11, 2020

    @HelioGuilherme66
    Member

    I tried the 2nd and RIDE does not open.

    After doing the 2nd and switching back, the prompt does not occur.

    So, please clarify if there is no problem when running RIDE from the command window (cmd):
    pythonw -m robotide.__init__

    or

    python -m robotide.__init__

  6. added
    pending
    on May 11, 2020
  7. HelioGuilherme66 commented on May 12, 2020

    @HelioGuilherme66
    Member

    @CMM-Guru Please see if this change does fix the Issue, by installing from master.

    I managed to force the error in Linux, by changing owner of *-ride.log in temp directory. Please double-check if there are no *-ride.log files owned by Administrator, or opened by some other applications or remote users (or, even possibly an anti-virus).

    If not fixed, a possible workaround is to disable RIDE Log on %APPDATA%\RobotFramework\RIDE\settings.cfg, set _enabled = False:

    [[Log]]
    log_to_console = False
    log_to_file = True
    _enabled = False
    
  8. added this to the v2.0 milestone on May 12, 2020
  9. added
    bug
    os: windows
    prio-low
    and removed
    analyze
    pending
    on May 12, 2020
  10. HelioGuilherme66 commented on May 12, 2020

    @HelioGuilherme66
    Member

    This is going to be reopened because it is not fully fixed. Refer to comment.

    I will try another strategy, for the pop-up of failed to delete log files, does not show.

  11. HelioGuilherme66 commented on May 12, 2020

    @HelioGuilherme66
    Member

    @CMM-Guru I have found a way to reproduce the error message appearing, with:

    cd %TMP%
    ride 2>log-ride.log
    

    This makes RIDE not being able to delete log-ride.log and the plugin is disabled. The normal error message is shown when a plugin failed to load (this is what I'll avoid to show in this case)

    My environment is Windows 10, 1909, python 3.8.1, and:
    robotframework 3.2.1
    robotframework-ride 2.0b1.dev1
    wxPython 4.1.0

    Code page in command window (chcp) is 65001.

  12. CMM-Guru commented on May 12, 2020

    @CMM-Guru
    Author

    Based on my comments on 2198, I'm concerned that after I exit RIDE (after saving files in RIDE) that the python task remains open even though RIDE closes.
    Is it possible that there is either a missing "close file" after writing files and python is still hanging on to that file handle and won't let the process end? And because of this, it obviously doesn't release the log file either.
    I'm thrilled that we won't have to deal with the error message. I'm concerned that there is an underlying problem causing the problem in the first place and that the message is simply a side-effect.

  13. HelioGuilherme66 commented on May 12, 2020

    @HelioGuilherme66
    Member

    The error is only happening when RIDE starts, it tries to delete previous *-ride.log files. There are only three log files that RIDE produce, in %TMP% the *-ride.log and *-ride_parser.log (different plugins), and the Run log file, in a directory created for it.
    Now I got this experiment for you to try, since you mentioned restricting the number of opened files (in the system?), I'd like you to try to start RIDE from the command window, passing a directory with tests and html files (like log.html or report.html), this will cause RIDE to log parsing errors in Parser Log tab. We will see if the same error happens.

  14. HelioGuilherme66 commented on May 13, 2020

    @HelioGuilherme66
    Member

    Finally I think I have fixed it. Seems that Python 3.8 was too picky when writing to stderr. Now the log plugin should remain OK.

  15. CMM-Guru commented on May 13, 2020

    @CMM-Guru
    Author

    Your previous comment. Could that also be why, when exiting RIDE (after saving a .robot file) that python itself would still be running in the background (and therefore holding control of the log file causing the error)? So, you fix when writing to stderr, in theory, may also fix the problem that the python process itself is not ending after exiting RIDE?

  16. CMM-Guru commented on May 13, 2020

    @CMM-Guru
    Author

    I'm also curious... per my observation of 2199, it appears that virtually all verification of issues is in linux. Does that imply that most people are not using RFW / RIDE in a Windows environment (which is required if you are using it to test Windows developments)?

    I can see that issues like this could be treated tremendously differently between linux and Windows. And that verification in linux does not necessarily mean that it is valid in Windows due to O/S interaction differences...??? (If that is the case, I would be willing to do some basic testing of at least beta releases for you)

  17. HelioGuilherme66 commented on May 13, 2020

    @HelioGuilherme66
    Member

    @CMM-Guru (First I'd like to know that you confirm the fix. Thanks.)

    I think that most people uses RIDE on Windows, I prefer to use Linux.

    As why the python process get's stuck, I don't know. This is not the first time it is reported, but more information should be found on the Internet.

    Could you use the Slack #ride channel for us to talk on these things? We also now have the forum.robotframework.org, as alternative for people with Slack blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugos: windowsprio-low

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions