endlessm / endless-key-app

Endless Key app for Windows (formerly known as kolibri-app)
https://www.endlessos.org/key
MIT License
2 stars 1 forks source link

Change KOLIBRI_WHL_URL to v0.16.0-alpha12 #105

Closed dylanmccall closed 1 year ago

dylanmccall commented 1 year ago

https://phabricator.endlessm.com/T34761


This requires a new release of https://github.com/endlessm/kolibri-explore-plugin.

manuq commented 1 year ago

https://phabricator.endlessm.com/T34761

This requires a new release of https://github.com/endlessm/kolibri-explore-plugin.

The release is done now: https://pypi.org/project/kolibri-explore-plugin/5.12.0/

starnight commented 1 year ago

Then, should this be ready for review now?

wjt commented 1 year ago

In light of b0fd9d34edd306ff56ae1dea7bbd6a6842ff79a3 I think this will need refreshing to bump the pinned version of the explore plugin to ~=6.0?

dylanmccall commented 1 year ago

I finally got myself into Windows mode to work on this properly, and I see we're getting a weird error where kolibri/dist/sqlalchemy/util/compat.py is trying to import dataclasses, and failing:

Traceback (most recent call last):
  File "main.pyw", line 125, in <module>
  File "main.pyw", line 101, in run
  File "main.pyw", line 108, in start_server
  File "kolibri_tools\utils.py", line 62, in start_kolibri_server
  File "src\kolibri\utils\cli.py", line 28, in <module>
  File "src\kolibri\utils\main.py", line 37, in <module>
  File "src\kolibri\utils\sanity_checks.py", line 9, in <module>
  File "src\kolibri\dist\sqlalchemy\__init__.py", line 8, in <module>
  File "src\kolibri\dist\sqlalchemy\util\__init__.py", line 14, in <module>
  File "src\kolibri\dist\sqlalchemy\util\_collections.py", line 16, in <module>
  File "src\kolibri\dist\sqlalchemy\util\compat.py", line 455, in <module>
ModuleNotFoundError: No module named 'dataclasses'

Kolibri includes sqlalchemy 1.4.44, so this is the offending line of code: https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4_44/lib/sqlalchemy/util/compat.py#L455.

I don't understand why this would be failing since as far as I can tell we're including Python 3.9, (that code in sqlalchemy is also under the same impression), and Python has included dataclasses since 3.7 🤔

But, this does check out: sqlalchemy was updated in Kolibri alpha 7: https://github.com/learningequality/kolibri/pull/9732/commits/639da554497ff67a97cc642b02dee253f0105706. The previous version doesn't try to import dataclasses.

If I work around that by crudely sticking in the dataclasses backport from pypi (https://pypi.org/project/dataclasses/), we get past that error and on to another familiar error:

Traceback (most recent call last):
  File "logging\config.py", line 543, in configure
  File "logging\config.py", line 655, in configure_formatter
  File "logging\config.py", line 474, in configure_custom
  File "src\kolibri\dist\colorlog\colorlog.py", line 203, in __init__
AttributeError: 'LoggerWriter' object has no attribute 'isatty'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "main.pyw", line 125, in <module>
  File "main.pyw", line 101, in run
  File "main.pyw", line 108, in start_server
  File "kolibri_tools\utils.py", line 65, in start_kolibri_server
  File "src\kolibri\utils\main.py", line 145, in setup_logging
  File "logging\config.py", line 809, in dictConfig
  File "logging\config.py", line 546, in configure
ValueError: Unable to configure formatter 'color'

So, okay, a few things to do here.