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

Variable Dragging not working on osx #36

Open
robdmc opened this issue Oct 15, 2020 · 20 comments
Open

Variable Dragging not working on osx #36

robdmc opened this issue Oct 15, 2020 · 20 comments

Comments

@robdmc
Copy link

robdmc commented Oct 15, 2020

I love this project. I can see myself using it constantly. It really fits a niche of working between spreadsheet and notebook. I actually think you could charge for this when it's mature.

Running miniconda python on OSX Cataline, and when trying to plot, the variables won't drag over. Let me know the best way to communicate my system state, and I can give you what you need.

Here's my setup.

λ which python
/Users/rob/miniconda/envs/viz/bin/python
•_simbiz•[mac_pro][19:17:04]( master )[ ~/rob/repos/sales_ops ]
λ python --version
Python 3.6.8 :: Anaconda, Inc.
•_simbiz•[mac_pro][19:17:08]( master )[ ~/rob/repos/sales_ops ]
λ pip freeze | grep gui
pandasgui==0.2.4.3
λ pip freeze | grep -i pyqt
PyQt5==5.15.1
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.1
@zkung
Copy link

zkung commented Oct 18, 2020

The same problems and annoyances.

@adamerose
Copy link
Owner

adamerose commented Oct 18, 2020

Can't reproduce the issue on Windows 10, so need someone else to help fix this and submit a PR.

Does this minimal example work? That'll help narrow down where the problem is

import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt

app = QtWidgets.QApplication(sys.argv)

list1 = QtWidgets.QListWidget()
list2 = QtWidgets.QListWidget()

list1.addItems(['1a','1b','1c'])
list2.addItems(['2a','2b','2c'])

list1.setDragEnabled(True)
list2.setDragEnabled(True)
list1.setAcceptDrops(True)
list2.setAcceptDrops(True)

container = QtWidgets.QWidget()
layout = QtWidgets.QVBoxLayout()
layout.addWidget(list1)
layout.addWidget(list2)
container.setLayout(layout)
container.show()

app.exec_()

@zkung
Copy link

zkung commented Oct 18, 2020

import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt

app = QtWidgets.QApplication(sys.argv)

list1 = QtWidgets.QListWidget()
list2 = QtWidgets.QListWidget()

list1.addItems(['1a','1b','1c'])
list2.addItems(['2a','2b','2c'])

list1.setDragEnabled(True)
list2.setDragEnabled(True)
list1.setAcceptDrops(True)
list2.setAcceptDrops(True)

container = QtWidgets.QWidget()
layout = QtWidgets.QVBoxLayout()
layout.addWidget(list1)
layout.addWidget(list2)
container.setLayout(layout)
container.show()

app.exec_()

This dragging works perfectly on OSX.

@zkung
Copy link

zkung commented Oct 18, 2020

Thank, the pandasGUI dragging functionality is already available.

@RyanMannix
Copy link

I also think this is an awesome project!

I can confirm the dragging functionality does not work on macOS.

MacOS Catalina ver 10.15.7

I tried the example above just in a python console from the terminal and it's the same effect. It creates the gui window with the 2 lists, none of the items in the list are "grab-able".

Wish I could help contribute but I think this is out of my area of experience.

@robdmc
Copy link
Author

robdmc commented Oct 21, 2020

@adamerose The toy example you provided (copied below) works fine on my copy of osx cataline

import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt

app = QtWidgets.QApplication(sys.argv)

list1 = QtWidgets.QListWidget()
list2 = QtWidgets.QListWidget()

list1.addItems(['1a','1b','1c'])
list2.addItems(['2a','2b','2c'])

list1.setDragEnabled(True)
list2.setDragEnabled(True)
list1.setAcceptDrops(True)
list2.setAcceptDrops(True)

container = QtWidgets.QWidget()
layout = QtWidgets.QVBoxLayout()
layout.addWidget(list1)
layout.addWidget(list2)
container.setLayout(layout)
container.show()

app.exec_()

@robdmc
Copy link
Author

robdmc commented Oct 21, 2020

@adamerose
I just updated to version pandasgui==0.2.5.1, and drag and drop appears to be working now. Thanks for the quick turn around. This issue can be closed as far as I'm concerned.

And thanks again for writing this.

@adamerose
Copy link
Owner

I just updated to version pandasgui==0.2.5.1, and drag and drop appears to be working now

None of those changes were related to this issue 😅 Maybe it randomly works sometimes? I'd be surprised if any of my recent commits fixed it

And apparently my toy demo posted above worked for @robdmc but didn't work for @RyanMannix ?

@zkung
Copy link

zkung commented Oct 21, 2020

I updated my pandasGUI, dragging function to use normal, thank you.

@rajgupt
Copy link

rajgupt commented Oct 22, 2020

For me, none of the dragdrop is working. even the example above not working on MACOS - Mojave

using pandasgui==0.2.5.1

@MiguelCosme
Copy link

I'm also using this project on MacOS Catalina 10.15.7, and yesterday everything worked fine.
However, today I have this issue, I cannot drag variables to the axis of the graph to generate a graph.

@robdmc
Copy link
Author

robdmc commented Oct 22, 2020

If it's at all helpful sorting this out, here are the exact versions that are working for me. on Catalina

Python 3.6.8 :: Anaconda, Inc.

pandasgui==0.2.5.1
PyQt5==5.15.1
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.1

@RyanMannix
Copy link

RyanMannix commented Oct 22, 2020

On Tuesday I had upgraded just before I made my comment, so I'm not 100% sure which version but whatever was most current at that time.

Regardless, I started a new virtual env, installed a few of the libraries I need for my project, then installed pandasgui and it works fine. So 👍 . Not sure if it's an updated version available through pypi since Tuesday, or if maybe not having cv2 full version installed prior to installing pandasgui just the headless versiono, or something else in my pip list was causing the issue.

As a side note, I had issues with PyQt5 (I do not remember the exact error)- I was importing cv2 and pandasgui which are both trying to use it, so originally I had uninstalled cv2 and installed the headless version. That appeared to solve the issue with PyQt5/using cv2 and pandasgui at the same time.

MacOS version: Catalina 10.15.7
opencv-python-headless==4.4.0.44
pandasgui==0.2.5.1
PyQt5==5.15.1
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.1

@robdmc
Copy link
Author

robdmc commented Oct 23, 2020

FWIW. I just checked.
I have opencv installed as well. Didn't know there could be an interaction there, as I almost never use it.

opencv-python==4.2.0.32

@RyanMannix
Copy link

RyanMannix commented Oct 23, 2020

I don't think the PyQt5 issues I had were related to pandasgui specifically. I think that only one library can be using it at the same time. If I understand it correctly, PyQt5 is what is bringing up the additional window, and, at least on macs, you can't have 2 libraries imported at the same time that both use PyQt5 for this feature. And having them installed is fine as long as you don't import them.

I did a quick test in a new env, and indeed importing both libraries causes the following error:

objc[50195]: Class QMacAutoReleasePoolTracker is implemented in both /path/to/env/env/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x11332b700) and /path/to/env/env/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x12b951178). One of the two will be used. Which one is undefined.
objc[50195]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /path/to/env/env/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x11332b778) and /path/to/env/env/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x12b9511f0). One of the two will be used. Which one is undefined.
objc[50195]: Class KeyValueObserver is implemented in both /path/to/env/env/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x11332b7a0) and /path/to/env/env/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x12b951218). One of the two will be used. Which one is undefined.
objc[50195]: Class RunLoopModeTracker is implemented in both /path/to/env/env/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x11332b7f0) and /path/to/env/env/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x12b951268). One of the two will be used. Which one is undefined.

@uiharu-kazari
Copy link

uiharu-kazari commented Oct 26, 2020

I have the same issue in macOS Catalina using python in Anaconda. According to the first answer in this link, the issue is caused by conflicts among the related modules installed from different channels.

If you are working within an Anaconda environment in a macOS as well, then the following steps might help.

  • Open a terminal and run conda list | greq pyqt. If you see something similar to

    pyqt                      5.9.2            py37h655552a_2  
    pyqt5                     5.15.1                   pypi_0    pypi
    pyqt5-sip                 12.8.1                   pypi_0    pypi
    pyqtwebengine             5.15.1                   pypi_0    pypi

    then continue to the next step.

  • Uninstall the three packages managed by pypi above. Do NOT uninstall pyqt.

    pip uninstall pyqt5 pyqt5-sip pyqtwebengine
  • If you run the toy example above at this moment, it should work (drag and drop). But pandasgui still needs the modules we uninstalled just now.

  • I updated pyqt here using conda update pyqt. But I am not sure whether this operation is really necessary.

  • Finally and magically, reinstall the deleted packages using pip solve this issue:

    pip install pyqt5-sip pyqtwebengine

    (pyqt5 will be automatically installed as pyqtwebengine depends on it).

@jhk0530
Copy link

jhk0530 commented Oct 26, 2020

I have same issue, toy example also didn't work for me.
I used jupyter with osX catalina.

pandasgui version 0.2.7

uninstall and re-install of pyqt5 (above comment) didn't work.

@shanto268
Copy link

shanto268 commented Oct 29, 2020

I just updated to version pandasgui==0.2.5.1, and drag and drop appears to be working now

None of those changes were related to this issue 😅 Maybe it randomly works sometimes? I'd be surprised if any of my recent commits fixed it

And apparently my toy demo posted above worked for @robdmc but didn't work for @RyanMannix ?

I can confirm that as weird as it sounds it actually seems to be working randomly. It was working me on day 1 (after multiple tries) when I used it and ever since then stopped working.

In reality, of course it is not random, there must be a hidden variable that is at play that needs to be addressed for the time being though I have no clue what that may be....

@ragyabraham
Copy link

I have the same issue in macOS Catalina using python in Anaconda. According to the first answer in this link, the issue is caused by conflicts among the related modules installed from different channels.

If you are working within an Anaconda environment in a macOS as well, then the following steps might help.

  • Open a terminal and run conda list | greq pyqt. If you see something similar to

    pyqt                      5.9.2            py37h655552a_2  
    pyqt5                     5.15.1                   pypi_0    pypi
    pyqt5-sip                 12.8.1                   pypi_0    pypi
    pyqtwebengine             5.15.1                   pypi_0    pypi

    then continue to the next step.

  • Uninstall the three packages managed by pypi above. Do NOT uninstall pyqt.

    pip uninstall pyqt5 pyqt5-sip pyqtwebengine
  • If you run the toy example above at this moment, it should work (drag and drop). But pandasgui still needs the modules we uninstalled just now.

  • I updated pyqt here using conda update pyqt. But I am not sure whether this operation is really necessary.

  • Finally and magically, reinstall the deleted packages using pip solve this issue:

    pip install pyqt5-sip pyqtwebengine

    (pyqt5 will be automatically installed as pyqtwebengine depends on it).

I can confirm that on macOS Catalina version 10.15.7 that this fix did not work. Dragging still not working after uninstalling/reinstalling

@happyware
Copy link

I had same issue.
But after I drag dataframe in left pane, I am able to drag variables.

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