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

Drag & Drop broken on Fedora 39/40 #109

Closed
swesemeyer opened this issue Jun 9, 2024 · 1 comment · Fixed by #112
Closed

Drag & Drop broken on Fedora 39/40 #109

swesemeyer opened this issue Jun 9, 2024 · 1 comment · Fixed by #112

Comments

@swesemeyer
Copy link

When dragging and dropping images onto the main window nothing happens....

Running Photocollage from the command line shows the following error:

/usr/lib/python3.12/site-packages/photocollage/artwork.py:21: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkPixbuf

Traceback (most recent call last):

  File "/usr/lib/python3.12/site-packages/photocollage/gtkgui.py", line 307, in on_drag
    files[i] = urllib.parse.unquote(files[i][7:])
 
              ^^^^^^^^^^^^

AttributeError: module 'urllib' has no attribute 'parse'

The fix is to
import urllib.parse in line 24 of gtkgui.py
instead of just urllib.

adrienverge added a commit that referenced this issue Jun 11, 2024
Because:

    >>> import urllib
    >>> urllib.parse.unquote('file://test')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: module 'urllib' has no attribute 'parse'
    >>> import urllib.parse
    >>> urllib.parse.unquote('file://test')
    'file://test'

Closes #109
@adrienverge
Copy link
Owner

Hello, thanks for the report!

I just tested with Fedora 40 and Python 3.12.3, I cannot reproduce the bug (dragging and dropping an image from Nautilus to PhotoCollage works as expected, as well as dragging and dropping images from within PhotoCollage (swapping them)).

However I can reproduce in a Python console:

>>> import urllib
>>> urllib.parse.unquote('file://test')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'urllib' has no attribute 'parse'
>>> import urllib.parse
>>> urllib.parse.unquote('file://test')
'file://test'

I fixed this in #112.

adrienverge added a commit that referenced this issue Jun 11, 2024
Because:

    >>> import urllib
    >>> urllib.parse.unquote('file://test')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: module 'urllib' has no attribute 'parse'
    >>> import urllib.parse
    >>> urllib.parse.unquote('file://test')
    'file://test'

Closes #109
ChrisLauinger77 pushed a commit to ChrisLauinger77/PhotoCollage that referenced this issue Jun 11, 2024
Because:

    >>> import urllib
    >>> urllib.parse.unquote('file://test')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: module 'urllib' has no attribute 'parse'
    >>> import urllib.parse
    >>> urllib.parse.unquote('file://test')
    'file://test'

Closes adrienverge#109
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

Successfully merging a pull request may close this issue.

2 participants