Error : Unable to find valuable text provider.

152 views
Skip to first unread message

markR

unread,
May 4, 2022, 1:52:59 PM5/4/22
to Kivy users support
Background:
-python 3.8.10 on linux mint
-requirements file:
     certifi==2021.10.8
     charset-normalizer==2.0.12
     docutils==0.18.1
     idna==3.3
     Kivy==2.1.0
     Kivy-Garden==0.1.5
     Pygments==2.12.0
     requests==2.27.1
     urllib3==1.26.9
-created a successful install using pynsist. Had one issue where I had to change Kivy-Garden from 0.1.4 to 0.1.5 to get by a compatible wheel.
-copied to a Windows machine and extracted/installed.
-got following text provider Error-shown at bottom
-Tried to execute the fix given by StackOverflow:

pip install --upgrade pip wheel setuptools pip install docutils pygments pypiwin32 kivy-deps.sdl2 kivy-deps.glew pip install kivy-deps.gstreamer pip install kivy-deps.angle pip install –-upgrade kivy

[INFO ] Logger: Record log in C:\Users\marka\.kivy\logs\kivy_22-05-03_37.txt
[INFO ] Kivy: v2.1.0
[INFO ] Kivy: Installed at "C:\Program Files\Cattle Mgt\pkgs\kivy\__init__.py"
[INFO ] Python: v3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
[INFO ] Python: Interpreter at "C:\Program Files\Cattle Mgt\Python\python.exe"
[INFO ] Logger: Purge log fired. Processing...
[INFO ] Logger: Purge finished!
[INFO ] Factory: 189 symbols loaded
[INFO ] Image: Providers: img_tex, img_dds (img_sdl2, img_pil, img_ffpyplayer ignored)
[CRITICAL] Text: Unable to find any valuable Text provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - ImportError: DLL load failed while importing _text_sdl2: The specified module could not be found.
File "C:\Program Files\Cattle Mgt\pkgs\kivy\core\__init__.py", line 59, in core_select_lib
mod = importlib.__import__(name='{2}.{0}.{1}'.format(
File "<frozen importlib._bootstrap>", line 1093, in __import__
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Program Files\Cattle Mgt\pkgs\kivy\core\text\text_sdl2.py", line 13, in <module>
from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents,

pil - ModuleNotFoundError: No module named 'PIL'
File "C:\Program Files\Cattle Mgt\pkgs\kivy\core\__init__.py", line 59, in core_select_lib
mod = importlib.__import__(name='{2}.{0}.{1}'.format(
File "<frozen importlib._bootstrap>", line 1093, in __import__
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Program Files\Cattle Mgt\pkgs\kivy\core\text\text_pil.py", line 7, in <module>
from PIL import Image, ImageFont, ImageDraw

[CRITICAL] App: Unable to get a Text provider, abort.

markR

unread,
May 4, 2022, 2:06:35 PM5/4/22
to Kivy users support
Sorry,submitted inadvertently before completed.
So after the StackOverflow fix I redid all and still have the same error.
Note during execution of the fix I did get below which may be able to point me to trying something else.
HOW DO YOU LOOK FOR CORRECT VERSIONS?

(kmd) mark@mark-Latitude-E7240:~/Python_Environments/bovine25$ pip install docutils pypments pipiwin32 kivy-deps.sdl2 kivy-deps.glew
Requirement already satisfied: docutils in /home/mark/Python_Environments/env3/kmd/lib/python3.8/site-packages (0.18.1)
ERROR: Could not find a version that satisfies the requirement pypments (from versions: none)
ERROR: No matching distribution found for pypments

(kmd) mark@mark-Latitude-E7240:~/Python_Environments/bovine25$ pip install kivy-deps.gstreamer
ERROR: Could not find a version that satisfies the requirement kivy-deps.gstreamer (from versions: none)
ERROR: No matching distribution found for kivy-deps.gstreamer

(kmd) mark@mark-Latitude-E7240:~/Python_Environments/bovine25$ pip install kivy-deps.angle
ERROR: Could not find a version that satisfies the requirement kivy-deps.angle (from versions: none)
ERROR: No matching distribution found for kivy-deps.angle

Robert

unread,
May 4, 2022, 3:10:44 PM5/4/22
to Kivy users support
Am I correct in assuming the intent is to create a self contained package of kivy app on Linux, and install on Windows?

If that is the case, its not going to work because KIvy, SDL2 and whatever are not pure Python.

markR

unread,
May 4, 2022, 8:11:22 PM5/4/22
to Kivy users support
Yes you are correct. Wow, i did not think that through.
So, I know you can not cross compile but I have read that you can create an .exe by using pyinstaller on a windows machine.
Would this work for my situation?
If so, do you know references that could help me understand how to perform that? I have not found allot of detail for a beginner.
If not,  is there any way to create on linux in python utilizing packages that are not all python and having them run on Windows?
Appreciate your help.

Robert

unread,
May 4, 2022, 9:01:45 PM5/4/22
to Kivy users support
I too wish I understood everything before I acted !!!!  But then there would be no debugging, and where is the fun in that?

> pyinstaller on a windows machine.
> Would this work for my situation?
Yes.

Elliot is the person to help you with this, here is a link to (what I understand is) his Windows pyinstaller template.
I fully expect he will answer any questions here (i know nothing)
Also search in this Group for related answers.

Elliot Garbus

unread,
May 4, 2022, 11:49:54 PM5/4/22
to kivy-...@googlegroups.com

For building Windows Apps, I use the Template Robert pointed out.  You will need to make the customizations as described.  I create a what pyinstaller calls a one-directory build, and package the app for distribution with Inno-Setup to create a professional Windows installer and uninstaller.  It has a wizard that makes it very easy to use.  https://jrsoftware.org/isinfo.php

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e8064de-bc83-4814-bf7e-3ff6a1b24003n%40googlegroups.com.

 

markR

unread,
May 5, 2022, 8:32:06 AM5/5/22
to Kivy users support
First, Thanks Robert for adding a little much needed humor here.
Elliot,
So to back up and get my head around this, before I can start a windows build; I have a "how to get started " questions from where I am at now:

-Can I just copy my environment folder I have on linux machine to the windows machine and start from there? Or, do I have to do something like- install the same version of Python on windows machine,create an environment, move MyApp.py and other files into it, install Kivy,  create a new requirements file,etc ?
-Also I will probably need to install the deBug app (Visual Studio) I am using to make sure it runs first.

Elliot Garbus

unread,
May 5, 2022, 9:05:31 AM5/5/22
to kivy-...@googlegroups.com

You will need to begin by creating the “environment” on your Windows Machine.

Install Python, VSCode, create a Venv, pip install kivy and your other dependencies (and pyinstaller).  Copy over your program and get it running.

 

Once you have things running – and I expect that will go very quickly – you can start with pyinstaller.

I often build for Windows and Mac. I will use git/GitHub.  Under may main program directory I create a directory I typically call ProgramNameDist.  I put my spec files in that directory and pyinstaller creates its directories there.  I’ll have Innosoft Setup also create an output directory and put the exe there.

 

Pyinstaller can be challenging to debug if things do not go as expected.  Read the kivy log files for clues (usually an import has failed). 

Here is a video on what Pyinstaller does I found this helpful.  The Pyinstaller docs can get a too detailed making it difficult to understand the overall process.  The docs have plenty of good info it just hard to see the forest through the trees… https://youtu.be/tOTLqUQC-k0

 

Happy to help if you hit a snag.  Good Luck!

markR

unread,
May 5, 2022, 9:27:13 AM5/5/22
to Kivy users support
Good stuff! I think this is just what I need right now.
Thank you for being graciously helpful.
Reply all
Reply to author
Forward
0 new messages