Kodi Community Forum
Issues with arrow - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: Python 3 migration (https://forum.kodi.tv/forumdisplay.php?fid=281)
---- Thread: Issues with arrow (/showthread.php?tid=350319)

Pages: 1 2


Issues with arrow - bsoriano - 2019-12-22

I am migrating skin.helper.service.widgets, and I am running into this issue with arrow:


2019-12-22 16:46:30.300 T:17192   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: 'bytes' object has no attribute 'tzinfo'
                                            Traceback (most recent call last):
                                              File "C:\Program Files\Kodi\addons\script.skin.helper.widgets\plugin.py", line 9, in <module>
                                                import main
                                              File "C:\Program Files\Kodi\addons\script.skin.helper.widgets\resources\lib\main.py", line 17, in <module>
                                                from metadatautils import MetadataUtils
                                              File "C:\Program Files\Kodi\addons\script.module.metadatautils\lib\metadatautils.py", line 9, in <module>
                                                import helpers.kodi_constants as kodi_constants
                                              File "C:\Program Files\Kodi\addons\script.module.metadatautils\lib\helpers\kodi_constants.py", line 9, in <module>
                                                from .utils import KODI_VERSION
                                              File "C:\Program Files\Kodi\addons\script.module.metadatautils\lib\helpers\utils.py", line 13, in <module>
                                                import arrow
                                              File "C:\Program Files\Kodi\addons\script.module.arrow\lib\arrow\__init__.py", line 3, in <module>
                                                from .api import get, now, utcnow
                                              File "C:\Program Files\Kodi\addons\script.module.arrow\lib\arrow\api.py", line 10, in <module>
                                                from arrow.factory import ArrowFactory
                                              File "C:\Program Files\Kodi\addons\script.module.arrow\lib\arrow\factory.py", line 19, in <module>
                                                from arrow.arrow import Arrow
                                              File "C:\Program Files\Kodi\addons\script.module.arrow\lib\arrow\arrow.py", line 1396, in <module>
                                                Arrow.max = Arrow.fromdatetime(datetime.max)
                                              File "C:\Program Files\Kodi\addons\script.module.arrow\lib\arrow\arrow.py", line 217, in fromdatetime
                                                if dt.tzinfo is None:
                                            AttributeError: 'bytes' object has no attribute 'tzinfo'
                                            -->End of Python script error report<--

I am using the latest arrow version, 0.15.5.  Any ideas? Thank you for any help provided.

Regards,

Bart


RE: Issues with arrow - ronie - 2019-12-22

it's a known issue when using kodi + arrow on windows.
kodi devs are looking into it.

https://github.com/crsmithdev/arrow/issues/738


RE: Issues with arrow - bsoriano - 2019-12-22

(2019-12-22, 23:00)ronie Wrote: it's a known issue when using kodi + arrow on windows.
kodi devs are looking into it.

https://github.com/crsmithdev/arrow/issues/738
@ronie, thanks! It seems that issue is closed.  Razzee seemed to think it was an implementation issue on his end, so he asked to close the issue.  Is this still being looked at? In my case, it seems that datetime.max returns an object type of 'bytes' in Windows 10.

Regards,

Bart


RE: Issues with arrow - Razze - 2019-12-22

(2019-12-22, 23:07)bsoriano Wrote:
(2019-12-22, 23:00)ronie Wrote: it's a known issue when using kodi + arrow on windows.
kodi devs are looking into it.

https://github.com/crsmithdev/arrow/issues/738
@ronie, thanks! It seems that issue is closed.  Razzee seemed to think it was an implementation issue on his end, so he asked to close the issue.  Is this still being looked at? In my case, it seems that datetime.max returns an object type of 'bytes' in Windows 10.

Regards,

Bart 

I don't think it's on my end. Which means arrow. I think it's somewhere in kodi's python 3 implementation on windows.


RE: Issues with arrow - bsoriano - 2019-12-29

@ronie, @Razze, any updates on the issues of arrow in Windows? Until this gets solved I cannot progress in migrating tv.show.next.aired to python 3. Thanks for your help.

Regards,

Bart


RE: Issues with arrow - Razze - 2019-12-30

(2019-12-29, 14:01)bsoriano Wrote: @ronie, @Razze, any updates on the issues of arrow in Windows? Until this gets solved I cannot progress in migrating tv.show.next.aired to python 3. Thanks for your help.

Regards,

Bart

It feels like the colleague looking into this is stuck. Or we are looking in the wrong place. Not sure if he had any more success @Paxxi


RE: Issues with arrow - syd3n - 2021-03-09

Apologies if not relevant. But I am using Kodi v19 on Windows and I am seeing this error when I install the Trakt.tv addon:

2021-03-09 16:15:10.930 T:15512   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ModuleNotFoundError'>
                                                   Error Contents: No module named 'queue'
                                                   Traceback (most recent call last):
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.trakt\default.py", line 6, in <module>
                                                       from resources.lib.service import traktService
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.trakt\resources\lib\service.py", line 20, in <module>
                                                       from resources.lib.traktapi import traktAPI
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.trakt\resources\lib\traktapi.py", line 17, in <module>
                                                       from trakt import Trakt
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.trakt\lib\trakt\__init__.py", line 3, in <module>
                                                       from trakt.client import TraktClient
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.trakt\lib\trakt\client.py", line 5, in <module>
                                                       from trakt.core.http import HttpClient
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.trakt\lib\trakt\core\http.py", line 9, in <module>
                                                       from trakt.core.request import TraktRequest
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.trakt\lib\trakt\core\request.py", line 3, in <module>
                                                       from requests import Request
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\__init__.py", line 43, in <module>
                                                       import urllib3
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\__init__.py", line 7, in <module>
                                                       from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 28, in <module>
                                                       from .packages.six.moves import queue
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\packages\six.py", line 91, in __get__
                                                       result = self._resolve()
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\packages\six.py", line 113, in _resolve
                                                       return _import_module(self.mod)
                                                     File "C:\Users\myusername\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\packages\six.py", line 82, in _import_module
                                                       __import__(name)
                                                   ModuleNotFoundError: No module named 'queue'
                                                   -->End of Python script error report<--



RE: Issues with arrow - Fuzzard - 2021-03-10

Thats a different issue. Looks like the queue module wasnt built for the windows libs. @Paxxi hopefully can have a look.


RE: Issues with arrow - RB0135 - 2021-04-01

Hi All,

I would like to comment that it is not just Windows that shows this issue.

I'm on Linux, Ubuntu 20.04 and have the same error, which causes Kodi to crash after the error.

Some Details:
Quote:Kodi compiled 2021-02-19 by GCC 9.3.0 for Linux x86 64-bit version 5.4.78 (328782)
Running on Ubuntu 20.04.2 LTS, kernel: Linux x86 64-bit version 5.4.0-562012221313-generic

Using arrow version 0.15.5, I get the following error:
Quote:2021-03-29 20:07:53.670 T:8844    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'datetime.timedelta' object has no attribute 'tzinfo'
                                                   Traceback (most recent call last):
                                                     File "/home/mediapc/.kodi/addons/script.skin.helper.service/plugin.py", line 10, in <module>
                                                       from resources.lib.plugin_content import PluginContent
                                                     File "/home/mediapc/.kodi/addons/script.skin.helper.service/resources/lib/plugin_content.py", line 22, in <module>
                                                       from metadatautils import MetadataUtils
                                                     File "/home/mediapc/.kodi/addons/script.module.metadatautils/lib/metadatautils.py", line 10, in <module>
                                                       import helpers.kodi_constants as kodi_constants
                                                     File "/home/mediapc/.kodi/addons/script.module.metadatautils/lib/helpers/kodi_constants.py", line 11, in <module>
                                                       from .utils import KODI_VERSION
                                                     File "/home/mediapc/.kodi/addons/script.module.metadatautils/lib/helpers/utils.py", line 13, in <module>
                                                       import arrow
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/__init__.py", line 3, in <module>
                                                       from .api import get, now, utcnow
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/api.py", line 10, in <module>
                                                       from arrow.factory import ArrowFactory
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/factory.py", line 19, in <module>
                                                       from arrow.arrow import Arrow
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/arrow.py", line 1396, in <module>
                                                       Arrow.max = Arrow.fromdatetime(datetime.max)
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/arrow.py", line 217, in fromdatetime
                                                       if dt.tzinfo is None:
                                                   AttributeError: 'datetime.timedelta' object has no attribute 'tzinfo'
                                                   -->End of Python script error report<--

I updated Arrow to the latest (1.03) and got a slightly different error, but along the same lines:
Quote:2021-04-01 12:00:24.138 T:9529    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'datetime.timedelta' object has no attribute 'timestamp'
                                                   Traceback (most recent call last):
                                                     File "/home/mediapc/.kodi/addons/script.skin.helper.service/plugin.py", line 10, in <module>
                                                       from resources.lib.plugin_content import PluginContent
                                                     File "/home/mediapc/.kodi/addons/script.skin.helper.service/resources/lib/plugin_content.py", line 22, in <module>
                                                       from metadatautils import MetadataUtils
                                                     File "/home/mediapc/.kodi/addons/script.module.metadatautils/lib/metadatautils.py", line 10, in <module>
                                                       import helpers.kodi_constants as kodi_constants
                                                     File "/home/mediapc/.kodi/addons/script.module.metadatautils/lib/helpers/kodi_constants.py", line 11, in <module>
                                                       from .utils import KODI_VERSION
                                                     File "/home/mediapc/.kodi/addons/script.module.metadatautils/lib/helpers/utils.py", line 13, in <module>
                                                       import arrow
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/__init__.py", line 2, in <module>
                                                       from .api import get, now, utcnow
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/api.py", line 12, in <module>
                                                       from arrow.arrow import TZ_EXPR, Arrow
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/arrow.py", line 34, in <module>
                                                       from arrow import formatter, locales, parser, util
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/parser.py", line 26, in <module>
                                                       from arrow.util import next_weekday, normalize_timestamp
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/util.py", line 6, in <module>
                                                       from arrow.constants import (
                                                     File "/home/mediapc/.kodi/addons/script.module.arrow/lib/arrow/constants.py", line 16, in <module>
                                                       _MAX_TIMESTAMP = datetime.max.timestamp()
                                                   AttributeError: 'datetime.timedelta' object has no attribute 'timestamp'
                                                   -->End of Python script error report<--

Quite happy to open a GitHub issue if you point me in the right direction.


RE: Issues with arrow - Karellen - 2021-04-01

There is an issue report here... https://github.com/xbmc/xbmc/issues/17311


RE: Issues with arrow - Wanilton - 2021-04-01

@RB0135 

Install one updated version, thanks to Angelinas. It fixes the issue.

http://files.xbmcbrasil.net/Scripts/script.module.arrow-0.15.5+matrix.1.zip

Check here the fix

https://github.com/arrow-py/arrow


RE: Issues with arrow - RB0135 - 2021-04-01

(2021-04-01, 04:59)Wanilton Wrote: @RB0135 

Install one updated version, thanks to Angelinas. It fixes the issue.

http://files.xbmcbrasil.net/Scripts/script.module.arrow-0.15.5+matrix.1.zip

Check here the fix

https://github.com/arrow-py/arrow
@Wanilton - Thanks for the link, but that was the version I was using when I mentioned in my post 0.15.5. I will re-install it just the same to see what happens.

I have noticed recently some developers are bringing out fixes in modules, but not changing the version number.. Makes it hard to keep up sometimes..

Thanks.


RE: Issues with arrow - RB0135 - 2021-04-01

(2021-04-01, 04:37)Karellen Wrote: There is an issue report here... https://github.com/xbmc/xbmc/issues/17311
Thanks @Karellen 

I have reported into there.

Much appreciated.


RE: Issues with arrow - Wanilton - 2021-04-01

(2021-04-01, 05:29)RB0135 Wrote:
(2021-04-01, 04:59)Wanilton Wrote: @RB0135 

Install one updated version, thanks to Angelinas. It fixes the issue.

http://files.xbmcbrasil.net/Scripts/script.module.arrow-0.15.5+matrix.1.zip

Check here the fix

https://github.com/arrow-py/arrow
@Wanilton - Thanks for the link, but that was the version I was using when I mentioned in my post 0.15.5. I will re-install it just the same to see what happens.

I have noticed recently some developers are bringing out fixes in modules, but not changing the version number.. Makes it hard to keep up sometimes..

Thanks.
Yes, it´s the same version number, but contains the fix. I only post here, the fix was included by angelinas. Tested in windows, and solve the trouble.

Bump the version to 0.15.6

http://files.xbmcbrasil.net/Scripts/script.module.arrow-0.15.6+matrix.1.zip


RE: Issues with arrow - RB0135 - 2021-04-01

(2021-04-01, 05:40)Wanilton Wrote:
(2021-04-01, 05:29)RB0135 Wrote:
(2021-04-01, 04:59)Wanilton Wrote: @RB0135 

Install one updated version, thanks to Angelinas. It fixes the issue.

http://files.xbmcbrasil.net/Scripts/script.module.arrow-0.15.5+matrix.1.zip

Check here the fix

https://github.com/arrow-py/arrow
@Wanilton - Thanks for the link, but that was the version I was using when I mentioned in my post 0.15.5. I will re-install it just the same to see what happens.

I have noticed recently some developers are bringing out fixes in modules, but not changing the version number.. Makes it hard to keep up sometimes..

Thanks.
Yes, it´s the same version number, but contains the fix. I only post here, the fix was included by angelinas. Tested in windows, and solve the trouble.

Bump the version to 0.15.6

http://files.xbmcbrasil.net/Scripts/script.module.arrow-0.15.6+matrix.1.zip
Great... Thanks for that.. Will try later tonight.


This forum uses Lukasz Tkacz MyBB addons.