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

pyqtgraph.python2_3 no longer exists #157

Open
sapols opened this issue Oct 27, 2021 · 3 comments
Open

pyqtgraph.python2_3 no longer exists #157

sapols opened this issue Oct 27, 2021 · 3 comments

Comments

@sapols
Copy link

sapols commented Oct 27, 2021

On line 6 of AxisItem.py you are importing:
from pyqtgraph.python2_3 import asUnicode

but pyqtgraph.python2_3 no longer exists in the current version of pyqtgraph (0.12.3). Since your requirements.txt specifies pyqtgraph >= 0.11.1, a normal import of pytplot now fails because dependency resolution will simply get the latest pyqtgraph and python2_3.py won't exist in it.

Either requirements.txt should be changed to specify a pyqtgraph version lower than 0.12.3 or AxisItem should be changed to not require pyqtgraph.python2_3. The latter is probably preferable since everyone's dropping Python 2 support.

@JeffreyBroll
Copy link

JeffreyBroll commented Oct 27, 2021

Further, since Python 3 all strings have been Unicode anyway - the function being imported just made sure the argument was encoded as a UTF-8 string

  • if python 2 encode ASCII string (or cast any non-string) into UTF-8
  • if python 3 cast to string (which is already Unicode)
    So python2 support can be maintained by cloning this, and if python2 support isn't of continued interest asUnicode can be replaced by str (or removed if the list 'strings' is absolutely always full of strings).
    asUnicode.txt

@AlimyBreak
Copy link

pip install pyqtgraph==0.11.1

@STBadman
Copy link

STBadman commented Apr 7, 2023

Hi, just wanted to ping that I was caught out by this same issue just now when upgrading pytplot to version 1.7.28 in response to spedas/pyspedas#434

I was prompted to install pyqtgraph and initially installed the latest version (0.13.2), for which the submodule python2_3 doesn't exists. I downgraded as above so it works now, but would be preferable for this not be called in pyspedas.

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

4 participants