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

MacOS: Clipboard nspaste make app crash when copying text #6170

Closed
Thong-Tran opened this issue Feb 22, 2019 · 2 comments · Fixed by #6178
Closed

MacOS: Clipboard nspaste make app crash when copying text #6170

Thong-Tran opened this issue Feb 22, 2019 · 2 comments · Fixed by #6178
Labels
Platform: OSX Priority: High Should be fixed ASAP Python3 Python3 support in Kivy Status: Confirmed Confirmed as real issue

Comments

@Thong-Tran
Copy link

Thong-Tran commented Feb 22, 2019

Versions

  • Python: 3.7.1
  • OS: MacOS 10.13.6
  • Kivy: 1.10.1
  • Kivy installation method: pypi

Description

When I try copy text in TextInput, this make app crash. But paste is OK.

Code and Logs

Traceback (most recent call last):
   File "main.py", line 56, in <module>
     app.run()
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/app.py", line 826, in run
     runTouchApp()
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/base.py", line 502, in runTouchApp
     EventLoop.window.mainloop()
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 727, in mainloop
     self._mainloop()
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 662, in _mainloop
     self.modifiers):
   File "kivy/_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch
   File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
   File "kivy/_event.pyx", line 1138, in kivy._event.EventObservers._dispatch
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/core/window/__init__.py", line 162, in _on_window_key_down
     return self.dispatch('on_key_down', keycode, text, modifiers)
   File "kivy/_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch
   File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
   File "kivy/_event.pyx", line 1138, in kivy._event.EventObservers._dispatch
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/uix/textinput.py", line 2434, in keyboard_on_key_down
     self.copy()
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/uix/textinput.py", line 1727, in copy
     return Clipboard.copy(self.selection_text)
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/core/clipboard/__init__.py", line 73, in copy
     self._copy(data)
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/core/clipboard/__init__.py", line 87, in _copy
     self.put(data, self._clip_mime_type)
   File "/Users/ivc/kivy/.env3/lib/python3.7/site-packages/kivy/core/clipboard/clipboard_nspaste.py", line 40, in put
     pb.writeObjects_([data])
   File "pyobjus/pyobjus.pyx", line 393, in pyobjus.ObjcMethod.__call__
   File "pyobjus/pyobjus_conversions.pxi", line 617, in pyobjus.convert_py_arg_to_cy
   File "pyobjus/pyobjus_conversions.pxi", line 441, in pyobjus.convert_py_to_nsobject
   File "pyobjus/pyobjus.pyx", line 393, in pyobjus.ObjcMethod.__call__
   File "pyobjus/pyobjus_conversions.pxi", line 617, in pyobjus.convert_py_arg_to_cy
   File "pyobjus/pyobjus_conversions.pxi", line 452, in pyobjus.convert_py_to_nsobject
   File "pyobjus/pyobjus.pyx", line 974, in pyobjus.objc_create_delegate
 pyobjus.ObjcException: You've passed b'kivyproject' as delegate, but there is no @protocol methods declared.
@tito tito added Platform: OSX Priority: High Should be fixed ASAP Python3 Python3 support in Kivy Status: Confirmed Confirmed as real issue labels Feb 23, 2019
@tito
Copy link
Member

tito commented Feb 23, 2019

You got a bug :)
In the meantime, you can avoid it by using KIVY_CLIPBOARD=sdl2 as a environemnt variable.

Thanks for reporting!

@Thong-Tran
Copy link
Author

Thong-Tran commented Feb 23, 2019

😂 Thank, I already used this setting instead of nspaste.

@tito tito closed this as completed Mar 6, 2019
@tito tito added this to To do in Mathieu's backlog via automation Mar 6, 2019
@tito tito moved this from To do to Done (no commit) in Mathieu's backlog Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: OSX Priority: High Should be fixed ASAP Python3 Python3 support in Kivy Status: Confirmed Confirmed as real issue
Projects
Mathieu's backlog
  
Done (no commit)
Development

Successfully merging a pull request may close this issue.

2 participants