後で使用するためにテキストをコピーする必要があります (ctrl + c) を押すと、エラーが発生するので、吹き出しを使用しましたが、同じエラーが表示されます
*****パイソン********
from kivy.app import App
from kivy.uix.popup import Popup
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.lang import Builder
class Progress(Popup):
pass
class ScreenManagement(ScreenManager):
pass
class Func(Screen):
pass
presentation = Builder.load_file("try_.kv")
class MainApp(App):
Progress = Progress()
def build(self):
return presentation
if __name__ == "__main__":
MainApp().run()
*****KVファイル*****
#:import Factory kivy.factory.Factory
# #:import Clipboard kivy.core.clipboard.Clipboard
<Progress>:
text: ""
separator_color: 0, 0, 0, 0
BoxLayout:
TextInput:
id: textinput
text: "Your Key is samphone"
copydata: 'text'
readonly: True
use_bubble: True
allow_copy: True
Button:
text: "Click"
on_release:
root.dismiss()
ScreenManagement:
Func:
<Func>:
BoxLayout:
Button:
text: "Click"
on_release:
Factory.Progress().open()
****エラー*****
ファイル "C:\Users\Sherif\AppData\Local\Programs\Python\Python35\lib\site-packages\kivy\uix\textinput.py"、378 行目、do textinput.copy() ファイル "C:\Users \Sherif\AppData\Local\Programs\Python\Python35\lib\site-packages\kivy\uix\textinput.py", line 1712, in copy return Clipboard.copy(self.selection_text) File "C:\Users\Sherif" \AppData\Local\Programs\Python\Python35\lib\site-packages\kivy\core\clipboard__init__.py"、73 行目、コピーの self._copy(data) ファイル "C:\Users\Sherif\AppData\Local\ Programs\Python\Python35\lib\site-packages\kivy\core\clipboard__init__.py"、87 行目、_copy self.put(data, self._clip_mime_type) 内
ファイル "C:\Users\Sherif\AppData\Local\Programs\Python\Python35\lib\site-packages\kivy\core\clipboard\clipboard_winctypes.py"、55 行目、put msvcrt.wcscpy_s(c_wchar_p(hCd)、 len(テキスト), c_wchar_p(テキスト))
ValueError: null 文字が埋め込まれています