mushroomfire / mdapy

A simple and fast python library to handle the data generated from molecular dynamics simulations
https://mdapy.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
57 stars 7 forks source link

GLFW emitted errors - Cannot Set Swap Interval and Failed to Make Context Current #2

Closed Tomocrystal closed 6 months ago

Tomocrystal commented 6 months ago

Hello, I am reaching out to report an issue that I have encountered while working with mdapy GUI. I am facing the following errors:

  1. Cannot set swap interval without a current OpenGL or OpenGL ES context
  2. WGL: Failed to make context current: ...... I would like to kindly request your assistance in resolving these errors. Thank you for your attention to this matter. I look forward to hearing from you soon.
mushroomfire commented 6 months ago

@Tomocrystal Hi, please give me more information, including your OS information, python/mdapy version. A simple example code is also helpful to reproduce the error.

Tomocrystal commented 6 months ago

image I started to run the GUI mode of mdapy in CMD, then the errors kept popping up as shown in the image. OS: win10 python:3.10.14 mdapy:0.10.4

mushroomfire commented 6 months ago

@Tomocrystal It seems not to be a mdapy API bug, and maybe a GLFW bug. You can try to explicitly allow Python to use the Nvidia GPU. The integrated Intel GPU may do not work. image image

Tomocrystal commented 6 months ago

The solution you provided worked perfectly and resolved the issue. Thank you so much for your help!