I am trying to use your app but I am not sure how to setup. I started the addon and I got a python error with textsize and I saw this has been changed to textlength so I made the changes in your files. When I start the addon, I just get a blank screen with all sports, my matches, and favorites with a hoops image in the background. I am pointing the SPORTS folder to your demo SPORTS folder. Do I need an API key or can I use what you have as default?
No the addon has its own dedicated api key. On the first run the addon can
take a minute or 2 to download all the images. I'm not sure what
"textlength" your referring to. Did you download the latest version today?
Are there any errors in the log? Enable debug logging restart kodi. Start
the addon on look for an error in the log. Then paste here I guess. I'm not
an expert at making add-ons or Github. This is the first message I've got
on here hopefully this method of communication works for log snippets.
On Sat, Mar 23, 2024, 4:30 p.m. stuckinthe @.***> wrote:
I am trying to use your app but I am not sure how to setup. I started the
addon and I got a python error with textsize and I saw this has been
changed to textlength so I made the changes in your files. When I start the
addon, I just get a blank screen with all sports, my matches, and favorites
with a hoops image in the background. I am pointing the SPORTS folder to
your demo SPORTS folder. Do I need an API key or can I use what you have as
default?
It's strange that the landing page has a basketball background. The landing
page should be grass.
On Sat, Mar 23, 2024, 4:30 p.m. stuckinthe @.***> wrote:
I am trying to use your app but I am not sure how to setup. I started the
addon and I got a python error with textsize and I saw this has been
changed to textlength so I made the changes in your files. When I start the
addon, I just get a blank screen with all sports, my matches, and favorites
with a hoops image in the background. I am pointing the SPORTS folder to
your demo SPORTS folder. Do I need an API key or can I use what you have as
default?
This is the python error I received in the kodi log
'ImageDraw' object has no attribute 'textsize' in mymatches/mymatchesseasons.py
I did a search and it said that textsize is deprecated and to use textlength so I changed them.
I stand corrected. I get the grassy field and then when I click on all sports. I get redirected to a page with a basketball hoop in the background. The images never load and I am not seeing any errors in the kodi.log as I have tuned on debug.
Maybe wait longer especially for "all sports" it has a lot to download from
the website and at the moment is just a proof of concept that I'm slowly
implementing. I right I'd focus on "my matches"
On Sat, Mar 23, 2024, 6:23 p.m. stuckinthe @.***> wrote:
This is the python error I received in the kodi log
'ImageDraw' object has no attribute 'textsize' in
mymatches/mymatchesseasons.py
I did a search and it said that textsize is deprecated and to use
textlength so I changed them.
I stand corrected. I get the grassy field and then when I click on all
sports. I get redirected to a page with a basketball hoop in the
background. The images never load and I am not seeing any errors in the
kodi.log as I have tuned on debug.
I tried going to my matches but it gives me a python error.
`error : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py", line 44, in onAction
self.sports_buttons.moveFocus(1, 0)
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 231, in moveFocus
self.parent_window.setFocusId(self.buttons[self.focused_index].getId())
IndexError: list index out of range
-->End of Python script error report<--
`
I think I remember getting this error when the folder system was not set
correctly in the settings. Maybe try to set the folders again. Remember the
SPORTS folder should be what you're pointing to not the folders in it...
Did the all sports page work at all?
On Sat, Mar 23, 2024, 9:37 p.m. stuckinthe @.***> wrote:
I let it run for 30 minutes and nothing happened.
I tried going to my matches but it gives me a python error.
error : EXCEPTION Thrown (PythonToCppException) : -->Python
callback/script returned the following error<-- - NOTE: IGNORING THIS CAN
LEAD TO MEMORY LEAKS! Error Type: <class 'IndexError'> Error Contents: list
index out of range Traceback (most recent call last): File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py",
line 44, in onAction self.sports_buttons.moveFocus(1, 0) File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py",
line 231, in moveFocus
self.parent_window.setFocusId(self.buttons[self.focused_index].getId())
of Python script error report<--
—
Reply to this email directly, view it on GitHub
<https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016657737>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAQHESXXBVCME7TF2RUYSE3YZYU4FAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGY2TONZTG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
This error is a movefocus error. Likely meaning it's trying to move the
focus between items that don't exist cause they weren't populated properly.
This points to the folder setting issue again. Don't give up! Haha
On Sat, Mar 23, 2024, 9:50 p.m. Mike Cox @.***> wrote:
I think I remember getting this error when the folder system was not set
correctly in the settings. Maybe try to set the folders again. Remember the
SPORTS folder should be what you're pointing to not the folders in it...
Did the all sports page work at all?
On Sat, Mar 23, 2024, 9:37 p.m. stuckinthe @.***>
wrote:
I let it run for 30 minutes and nothing happened.
I tried going to my matches but it gives me a python error.
error : EXCEPTION Thrown (PythonToCppException) : -->Python
callback/script returned the following error<-- - NOTE: IGNORING THIS CAN
LEAD TO MEMORY LEAKS! Error Type: <class 'IndexError'> Error Contents: list
index out of range Traceback (most recent call last): File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py",
line 44, in onAction self.sports_buttons.moveFocus(1, 0) File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py",
line 231, in moveFocus
self.parent_window.setFocusId(self.buttons[self.focused_index].getId())
of Python script error report<--
—
Reply to this email directly, view it on GitHub
<https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016657737>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAQHESXXBVCME7TF2RUYSE3YZYU4FAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGY2TONZTG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
Where does the SPORTS folder setting need to point to. I have tried /home/path/.kodi/addons/plugin.sportsview/SPORTS and also I have tried /home/path/.kodi/addons/plugin.sportsview/SPORTS/MLB
inside it should be sports like baseball, rugby, ice hockey, motorsport,
soccer.
Not leagues.
Attached is a photo of what the all sports page should look like.
On Sat, Mar 23, 2024, 10:06 p.m. stuckinthe @.***>
wrote:
No the sports all didn't work.
Where does the SPORTS folder setting need to point to. I have tried
/home/path/.kodi/addons/plugin.sportsview/SPORTS and also I have tried
/home/path/.kodi/addons/plugin.sportsview/SPORTS/MLB
If you want to test the issue with the all sports page you'll have to
enable debug logging, close kodi, repoen kodi, open the sportsview addon,
go to all sports and wait 2 minutes. Then look in the log and send me the
error if there is one.
On Sat, Mar 23, 2024, 10:06 p.m. stuckinthe @.***>
wrote:
No the sports all didn't work.
Where does the SPORTS folder setting need to point to. I have tried
/home/path/.kodi/addons/plugin.sportsview/SPORTS and also I have tried
/home/path/.kodi/addons/plugin.sportsview/SPORTS/MLB
I'm running Arch Linux 64 bit on a Raspberry Pi so ARM. I am also using Python 3.11.8
I can't see your attachment.
I see. That I have not tested it on. It works on Nvidia shield (android), Windows 10, and Windows 11. I would have thought that once in the kodi environment it would be good to go. Hopefully that's the case. I'm interested to see the all sports errors tbh.
Maybe... But, I don't think that should be a problem according to this: https://kodi.wiki/view/Special_protocol ... the special protocol should work regardless of OS.
Did you get an error regarding the custom font directory?
In your ....kodi\addons\plugin.sportsview\resources\fonts\ folder is the font there??
Maybe... But, I don't think that should be a problem according to this: https://kodi.wiki/view/Special_protocol ... the special protocol should work regardless of OS.
Did you get an error regarding the custom font directory?
In your ....kodi\addons\plugin.sportsview\resources\fonts\ folder is the font there??
Yeah I think you are correct. I will try again in the morning and check the debug log file to see if it throws an error. It never gave me a missing font file error.
There seem to be no errors but (possibly unimportant because no errors)
there seem to be some characters missing in filenames like allsports.xml is
only "allsports.xm" and later just "allsports." but that would throw an
error for sure.
Maybe try deleting the sportsview folder in temp and try again?
On Sun, Mar 24, 2024, 12:39 a.m. stuckinthe @.***>
wrote:
These are the only entries I see when I select All Sports
I just copied the relevant parts of the log file. I don't see any errors.
I deleted the temp folder and tried again. I can't figure out why it doesn't work. In All Sports if I hit the arrow key I see the American Football button without any text on it. For some reason it doesn't loop through the rest of them. I click on the AFB button and it takes me to a multi-color background page with nothing on it.
That's really interesting and is starting to make me believe it is a Linux
issue or pi limitation.
If I had a Linux machine and knew anything about it I would love to test it
and make it work. Even when I built it on Windows then tested it on my
shield it did require some small changes to make it compatible on both. But
even then it threw errors for me to work with.
I wonder if the pi is struggling? It is a ton of stuff all pulled from the
api website. Does it lock up?
As a side note. The addon in its current state is really only good for the
"my matches" section which I do use for my personal use and may make a fork
to focus and streamline just that. If that's something you want to use it
for we could focus on getting that to work for you?
On Sun, Mar 24, 2024, 11:33 a.m. stuckinthe @.***>
wrote:
I just copied the relevant parts of the log file. I don't see any errors.
I deleted the temp folder and tried again. I can't figure out why it
doesn't work. In All Sports if I hit the arrow key I see the American
Football button without any text on it. For some reason it doesn't loop
through the rest of them. I click on the AFB button and it takes me to a
multi-color background page with nothing on it.
I have a Rpi 5 so probably has enough power. The 3+ I had I would have said possible it wasn't enough power.
We can work on my matches. You could setup a VirtualBox on your windows system and install arch or any other linux distro and then install Kodi and then your app.
When you select "my matches" on the landing page what happens?
Are there any errors at that point?
In configuration what is your sports folder and what are its contents?
On Mon, Mar 25, 2024, 3:27 p.m. stuckinthe @.***> wrote:
I have a Rpi 5 so probably has enough power. The 3+ I had I would have
said possible it wasn't enough power.
We can work on my matches. You could setup a VirtualBox on your windows
system and install arch or any other linux distro and then install Kodi and
then your app.
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'AttributeError'> Error Contents: 'ImageDraw' object has no attribute 'textsize' Traceback (most recent call last): File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py", line 23, in onInit self.sports_buttons.get_sports_folders() File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 80, in get_sports_> self.check_button_cache() File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 103, in check_butt> self.generate_custom_buttons(sport) File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 128, in generate_c> text_width, text_height = focused_draw.textsize(sport, font) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ImageDraw' object has no attribute 'textsize' -->End of Python script error report<--
it's so strange that on your machine it doesn't like "textsize"... I realize it's deprecated but it still works everywhere else i test.
Either way, when i change it to "textlength" in my tests it does work and I'll keep it as that since it appears to be the up-to-date term.
Could this have something to do with the version of PIL installed? I was under the impression that the addon.xml file line here: "import addon="script.module.pil" version="1.1.7"/" set this. But maybe this is just the script that kodi uses to interpret/relay the PIL commands.???
What is directly in your sports folder? If there are no sports that match
sports in thesportdb api then it'll be empty, therefore no words, therefore
no textlength.
Can you take a screenshot of your sports folder in a file browser and then
a screenshot of your configuration showing the sports folder you've pointed
to in the sportsview configuration?
On Tue, Mar 26, 2024, 12:25 p.m. Mike Cox @.***> wrote:
Yeah. I didn't change anything. Only updated it to reflect the change you
had made.
What version of pillow do you have installed?
On Tue, Mar 26, 2024, 12:11 p.m. stuckinthe @.***>
wrote:
NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'TypeError'>
Error Contents: cannot unpack non-iterable float object
Traceback (most recent call last):
File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py",
line 23, in onInit
self.sports_buttons.get_sports_folders()
File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py",
line 80, in get_sports_f>
self.check_button_cache()
File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py",
line 103, in check_butto>
self.generate_custom_buttons(sport)
File
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py",
line 128, in generate_cu>
text_width, text_height = focused_draw.textlength(sport, font)
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable float object
-->End of Python script error report<--
Yes. That's the folder that it should be pointed to. I was hoping to see
what yours had. Earlier I think there was mention of /sports/mlb/etc. this
would not work... It should be sports/baseball/mlb/etc. ... If I could see
a pic of your folder structure to make sure it is good that would eliminate
possible causes. Then we can move to the next step. Also the configuration
screen pic.. It doesn't have to be a screenshot. Just a photo.
On Tue, Mar 26, 2024, 4:54 p.m. stuckinthe @.***> wrote:
The latest version of pillow is 10.2. Is this what you have? Where are you
getting script.module.pil version number?
What is RC1? Like a nightly build or something? Kodi is at 20.5 afaik.
Probably. Not the cause. Could you try installing the current version of
kodi to see if it works?
On Tue, Mar 26, 2024, 4:54 p.m. stuckinthe @.***> wrote:
When I right click on the SportsView addon and then info and then dependencies, it display what is needed and what I have. It says I have PIL 5.1. RC stands for release candidate as I am using Kodi 21. I probably can't downgrade.
delete my folder : "\Kodi\temp\sportsview\my_sports_buttons_cache"
change line 128 to "textlength" and go to the "my matches" page
it doesn't work. i get the error:
2024-03-27 12:50:02.704 T:28592 error : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: 'ImageDraw' object has no attribute 'textlength'
Traceback (most recent call last):
File "C:\Users\mjc_c\AppData\Roaming\Kodi\addons\plugin.sportsview\mysports\mysportswindow.py", line 23, in onInit
self.sports_buttons.get_sports_folders()
File "C:\Users\mjc_c\AppData\Roaming\Kodi\addons\plugin.sportsview\mysports\mysportsbuttons.py", line 80, in get_sports_folders
self.check_button_cache()
File "C:\Users\mjc_c\AppData\Roaming\Kodi\addons\plugin.sportsview\mysports\mysportsbuttons.py", line 103, in check_button_cache
self.generate_custom_buttons(sport)
File "C:\Users\mjc_c\AppData\Roaming\Kodi\addons\plugin.sportsview\mysports\mysportsbuttons.py", line 128, in generate_custom_buttons
text_width, text_height = focused_draw.textlength(sport, font)
AttributeError: 'ImageDraw' object has no attribute 'textlength'
-->End of Python script error report<--
But, when i
delete my folder : "\Kodi\temp\sportsview\my_sports_buttons_cache"
change line 128 to "textsize" and go to the "my matches" page
It works.
I thought it might be because my version of PIL was 10.0... I updated it to 10.2 and went through these steps again both ways (textsize and textlength) and still get the same results.
Strange that textlength will not work for me but textsize won't work for you.
executableA Kodi add-on for displaying sports information.This add-on provides information about various sports including leagues, teams, and players.allGPLv2http://forum.example.comhttp://www.example.comcontact@example.comhttps://github.com/your-username/your-repositoryhttp://www.example.com/newsicon.pngfanart.jpg
This should not be happening! All the dependencies and versions are the
same for everything. The folders are set properly. For some reason yours is
being strict on textlength and mine is strict on textsize. Neither of which
should really be. Even if it is deprecated all it should show is a warning
that it's deprecated.
On Wed, Mar 27, 2024, 9:01 p.m. stuckinthe @.***> wrote:
FindAddons: script.module.pil v5.1.0 installed
`
executableA Kodi add-on for displaying sports information.This add-on provides information about various sports including leagues, teams, and players.allGPLv2http://forum.example.comhttp://www.example.com
***@***.***
https://github.com/your-username/your-repositoryhttp://www.example.com/newsicon.pngfanart.jpg
"/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py", line 23, in onInit
self.sports_buttons.get_sports_folders()
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 80, in get_sports_f>
self.check_button_cache()
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 103, in check_butto>
self.generate_custom_buttons(sport)
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 128, in generate_cu>
text_width, text_height = focused_draw.textlength(sport, font)
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable float object
-->End of Python script error report<--
Textsize:
NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: 'ImageDraw' object has no attribute 'textsize'
Traceback (most recent call last):
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportswindow.py", line 23, in onInit
self.sports_buttons.get_sports_folders()
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 80, in get_sports_f>
self.check_button_cache()
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 103, in check_butto>
self.generate_custom_buttons(sport)
File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 128, in generate_cu>
text_width, text_height = focused_draw.textsize(sport, font)
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ImageDraw' object has no attribute 'textsize'
-->End of Python script error report<--
I am trying to use your app but I am not sure how to setup. I started the addon and I got a python error with textsize and I saw this has been changed to textlength so I made the changes in your files. When I start the addon, I just get a blank screen with all sports, my matches, and favorites with a hoops image in the background. I am pointing the SPORTS folder to your demo SPORTS folder. Do I need an API key or can I use what you have as default?