ZappBrannigannnn / SportsView

1 stars 0 forks source link

How to setup this addon #1

Open ghost opened 5 months ago

ghost commented 5 months ago

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?

ZappBrannigannnn commented 5 months ago

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?

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESSGF7KHL32RARGWNCTYZXQ7TAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDIMBTGY3DGNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ZappBrannigannnn commented 5 months ago

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?

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESSGF7KHL32RARGWNCTYZXQ7TAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDIMBTGY3DGNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghost commented 5 months ago

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.

ZappBrannigannnn commented 5 months ago

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.

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016618136, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESTEMXZOXP3F53BPCCDYZX6HJAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGYYTQMJTGY . You are receiving this because you commented.Message ID: @.***>

ghost commented 5 months ago

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<--

ZappBrannigannnn commented 5 months ago

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:
***@***.***>
ZappBrannigannnn commented 5 months ago

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:
***@***.***>
ghost commented 5 months ago

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

ZappBrannigannnn commented 5 months ago

What machine are you using?

It should be for example:

C:/SPORTS/

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

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016665273, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESX4AILZYPNVXZ7VE4TYZYYKJAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGY3DKMRXGM . You are receiving this because you commented.Message ID: @.***>

ZappBrannigannnn commented 5 months ago

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

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016665273, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESX4AILZYPNVXZ7VE4TYZYYKJAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGY3DKMRXGM . You are receiving this because you commented.Message ID: @.***>

ghost commented 5 months ago

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.

ZappBrannigannnn commented 5 months ago

20240323_224254

ZappBrannigannnn commented 5 months ago

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.

ghost commented 5 months ago

I think this could be a problem in linux

custom_font_path = xbmcvfs.translatePath("special://home/addons/plugin.sportsview/resources/fonts/ariblk.ttf")

If I have it correctly, the special: points to /home/user/.kodi

and the above line would point to

/home/user/.kodi/home/addons/plugin.sportsview/resources/fonts/ariblk.ttf which doesn't exist. I will test tomorrow.

ZappBrannigannnn commented 5 months ago

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??

ZappBrannigannnn commented 5 months ago

"home" should just differentiate between the few access points that "special" points to.... I THINK!! haha

ghost commented 5 months ago

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.

ZappBrannigannnn commented 5 months ago

okay. cool. you had me worried. cause getting kodi to use custom font was a major pain. But i was being stubborn about it.

let me know how it goes!

ghost commented 5 months ago

These are the only entries I see when I select All Sports

`2024-03-23 23:32:19.463 T:405 debug : Activating window ID: 13030 2024-03-23 23:32:19.463 T:405 debug : ------ Window Deinit (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/landingpag> 2024-03-23 23:32:19.463 T:405 debug : ------ Window Init (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.xm> 2024-03-23 23:32:19.463 T:405 info : Loading skin file: /home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.xml> 2024-03-23 23:32:19.463 T:343439 debug : AllSportsWindow - onInit 2024-03-23 23:32:19.463 T:343439 debug :

2024-03-23 23:32:19.879 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc 2024-03-23 23:32:20.257 T:343439 debug : ALLSPORTS_LIST.TXT AND SPORTS_LIST MATCH 2024-03-23 23:32:20.257 T:343439 debug :

2024-03-23 23:32:20.264 T:343439 debug : ffmpeg[0x555622be1b98]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.

2024-03-23 23:32:13.663 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc 2024-03-23 23:32:13.669 T:405 debug : Activating window ID: 10000 2024-03-23 23:32:13.669 T:405 debug : ------ Window Deinit (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.> 2024-03-23 23:32:13.669 T:405 debug : ------ Window Init (Home.xml) ------ 2024-03-23 23:32:13.750 T:343433 debug : Thread JobWorker start, auto delete: true 2024-03-23 23:32:13.750 T:343433 debug : [threads] name: 'JobWorker' priority: '1' 2024-03-23 23:32:13.760 T:343433 debug : ffmpeg[0x555620f71a30]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra. 2024-03-23 23:32:13.881 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc 2024-03-23 23:32:13.663 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc 2024-03-23 23:32:13.669 T:405 debug : Activating window ID: 10000 2024-03-23 23:32:13.669 T:405 debug : ------ Window Deinit (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.> 2024-03-23 23:32:13.669 T:405 debug : ------ Window Init (Home.xml) ------ 2024-03-23 23:32:13.750 T:343433 debug : Thread JobWorker start, auto delete: true 2024-03-23 23:32:13.750 T:343433 debug : [threads] name: 'JobWorker' priority: '1' 2024-03-23 23:32:13.760 T:343433 debug : ffmpeg[0x555620f71a30]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra. 2024-03-23 23:32:13.881 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc

2024-03-23 23:46:38.201 T:344540 info : Skipped 3 duplicate messages.. 2024-03-23 23:46:38.201 T:344540 debug : WINDOW MANAGER: LAUNCH ALL SPORTS PAGE 2024-03-23 23:46:38.201 T:344540 debug :

2024-03-23 23:46:38.201 T:344540 debug : WINDOW MANAGER: CLOSE PAGE 2024-03-23 23:46:38.201 T:344540 debug :

2024-03-23 23:46:38.211 T:405 debug : Activating window ID: 13032 2024-03-23 23:46:38.211 T:405 debug : ------ Window Deinit (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/landingpag> 2024-03-23 23:46:38.211 T:405 debug : ------ Window Init (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.xm> 2024-03-23 23:46:38.211 T:405 info : Loading skin file: /home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.xml> 2024-03-23 23:46:38.212 T:344540 debug : AllSportsWindow - onInit 2024-03-23 23:46:38.212 T:344540 debug :

2024-03-23 23:46:38.990 T:344540 debug : ALLSPORTS_LIST.TXT AND SPORTS_LIST MATCH 2024-03-23 23:46:38.990 T:344540 debug :

2024-03-23 23:46:38.995 T:344540 debug : ffmpeg[0x7ffeec2e2c98]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra. `

ZappBrannigannnn commented 5 months ago

Was this a direct copy and paste?

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

`2024-03-23 23:32:19.463 T:405 debug : Activating window ID: 13030 2024-03-23 23:32:19.463 T:405 debug : ------ Window Deinit (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/landingpag> 2024-03-23 23:32:19.463 T:405 debug : ------ Window Init (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.xm> 2024-03-23 23:32:19.463 T:405 info : Loading skin file: /home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.xml> 2024-03-23 23:32:19.463 T:343439 debug : AllSportsWindow - onInit 2024-03-23 23:32:19.463 T:343439 debug :

2024-03-23 23:32:19.879 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc 2024-03-23 23:32:20.257 T:343439 debug : ALLSPORTS_LIST.TXT AND SPORTS_LIST MATCH 2024-03-23 23:32:20.257 T:343439 debug :

2024-03-23 23:32:20.264 T:343439 debug : ffmpeg[0x555622be1b98]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.

2024-03-23 23:32:13.663 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc 2024-03-23 23:32:13.669 T:405 debug : Activating window ID: 10000 2024-03-23 23:32:13.669 T:405 debug : ------ Window Deinit (/home/alarm/.kodi/addons/plugin.sportsview/resources/skins/default/1080i/allsports.> 2024-03-23 23:32:13.669 T:405 debug : ------ Window Init (Home.xml) ------ 2024-03-23 23:32:13.750 T:343433 debug : Thread JobWorker start, auto delete: true 2024-03-23 23:32:13.750 T:343433 debug : [threads] name: 'JobWorker' priority: '1' 2024-03-23 23:32:13.760 T:343433 debug : ffmpeg[0x555620f71a30]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra. 2024-03-23 23:32:13.881 T:343432 debug <CWebserver[8080]>: request received for /jsonrpc

`

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016691260, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESUSATYSGVCXCLCDZ4TYZZKJVAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGY4TCMRWGA . You are receiving this because you were assigned.Message ID: @.***>

ghost commented 5 months ago

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.

ZappBrannigannnn commented 5 months ago

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.

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2016845963, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESVP4H6PFJCB77JWBNTYZ3W4VAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHA2DKOJWGM . You are receiving this because you were assigned.Message ID: @.***>

ghost commented 5 months ago

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.

ZappBrannigannnn commented 5 months ago

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.

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2018750519, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESTPS63RR6BXDMJNQ6DY2B3BVAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYG42TANJRHE . You are receiving this because you were assigned.Message ID: @.***>

ghost commented 5 months ago

I am pointing to your demo sports folder.

This does give me an error.

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_folders self.check_button_cache() File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 103, in check_button_cache self.generate_custom_buttons(sport) File "/home/alarm/.kodi/addons/plugin.sportsview/mysports/mysportsbuttons.py", line 128, in generate_custom_buttons text_width, text_height = focused_draw.textlength(sport, font) ^^^^^^^^^^^^^^^^^^^^^^^ TypeError: cannot unpack non-iterable float object -->End of Python script error report<--

ZappBrannigannnn commented 5 months ago

Isn't this from the change you made to the code the other day?

My line 128 looks like this:

        text_width, text_height = focused_draw.textsize(sport, font)
ZappBrannigannnn commented 5 months ago

try it again with textsize instead of textlength then post the error for me.

ghost commented 5 months ago

- 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<--

ZappBrannigannnn commented 5 months ago

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.???

ZappBrannigannnn commented 4 months ago

i only changed it in the mysportsbuttons.py line 128 so we may run into this again later.

ghost commented 4 months ago

Same error.

ZappBrannigannnn commented 4 months ago

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<--

Same error.

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2020854601, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESQ6H5ENWAXLC7Z2B7LY2GM2JAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRQHA2TINRQGE . You are receiving this because you were assigned.Message ID: @.***>

ZappBrannigannnn commented 4 months ago

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<--

Same error.

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2020854601, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESQ6H5ENWAXLC7Z2B7LY2GM2JAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRQHA2TINRQGE . You are receiving this because you were assigned.Message ID: @.***>

ghost commented 4 months ago

I am pointing to this folder on my RPI

https://github.com/ZappBrannigannnn/SportsView/tree/main/plugin.sportsview/SPORTS

It says my script.module.pil is 5.1 and I am running Kodi 21 RC1

ZappBrannigannnn commented 4 months ago

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:

I am pointing to this folder on my RPI

https://github.com/ZappBrannigannnn/SportsView/tree/main/plugin.sportsview/SPORTS

It says my script.module.pil is 5.1 and I am running Kodi 21 RC1

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2021455223, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESTTSHAFX3W7VRTVM3DY2HOAJAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGQ2TKMRSGM . You are receiving this because you were assigned.Message ID: @.***>

ZappBrannigannnn commented 4 months ago

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:

I am pointing to this folder on my RPI

https://github.com/ZappBrannigannnn/SportsView/tree/main/plugin.sportsview/SPORTS

It says my script.module.pil is 5.1 and I am running Kodi 21 RC1

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2021455223, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESTTSHAFX3W7VRTVM3DY2HOAJAVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGQ2TKMRSGM . You are receiving this because you were assigned.Message ID: @.***>

ghost commented 4 months ago

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. Screenshot_20240326_173949

ghost commented 4 months ago

The actual python-pillow version I have is 10.2.

ZappBrannigannnn commented 4 months ago

okay. this all looks good... let me experiment a bit.

ZappBrannigannnn commented 4 months ago

the strangest thing is that when I:

  1. delete my folder : "\Kodi\temp\sportsview\my_sports_buttons_cache"
  2. change line 128 to "textlength" and go to the "my matches" page
  3. 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<--

But, when i

  1. delete my folder : "\Kodi\temp\sportsview\my_sports_buttons_cache"
  2. change line 128 to "textsize" and go to the "my matches" page
  3. 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.

ZappBrannigannnn commented 4 months ago

This is a strange question. Can you copy and paste your addon.xml file contents here please?

ZappBrannigannnn commented 4 months ago

Also, when you startup kodi does the log say "FindAddons: script.module.pil v5.1.0 installed" ?

ghost commented 4 months ago

FindAddons: script.module.pil v5.1.0 installed

`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

executable A Kodi add-on for displaying sports information. This add-on provides information about various sports including leagues, teams, and players. all GPLv2 http://forum.example.com http://www.example.com contact@example.com https://github.com/your-username/your-repository http://www.example.com/news icon.png fanart.jpg

`

ZappBrannigannnn commented 4 months ago

Aahhhh... This is driving me crazy!

I asked for help on the kodi forum...

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

`

executable A Kodi add-on for displaying sports information. This add-on provides information about various sports including leagues, teams, and players. all GPLv2 http://forum.example.com http://www.example.com ***@***.*** https://github.com/your-username/your-repository http://www.example.com/news icon.png fanart.jpg

`

— Reply to this email directly, view it on GitHub https://github.com/ZappBrannigannnn/SportsView/issues/1#issuecomment-2024219662, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAQHESUOM3XWT3NBPYOOGDTY2NTV7AVCNFSM6AAAAABFE5E3HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRUGIYTSNRWGI . You are receiving this because you were assigned.Message ID: @.***>

ZappBrannigannnn commented 4 months ago

Sorry... First time turning on my computer for a while.

I got the advice to remove the PIL version number from the addon.xml

Try updating, then try again...

ghost commented 4 months ago

With textsize changed to textlength

"/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:

ZappBrannigannnn commented 4 months ago

Looks like the errors didn't change. So the suggestion didn't work.

I'll keep working on it.