Code Monkey home page Code Monkey logo

Comments (22)

ajslater avatar ajslater commented on August 17, 2024 1

Thanks. I'll try to look into this. As a practical consideration, you might try running codex on Docker for windows until I can fix up native windows bugs.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024 1

With WSL, the web UI seems to work both from user and admin accounts. It's just an issue (I think) with mounting the folder in a way that doesn't timeout.

/mnt/e/usenet/comics is just a folder on one of my NTFS windows drive, using WSL2's built in automap feature for cross-filesystem stuff. It's also a 470GB directory, so not too surprised - when adding it all to the library I get two titles with one issue each

I've just tested adding a single subdirectory and it mounts that fine (maybe some bad tags, it's adding it as 5 issues split across two series, but it's adding it, and 'folder view' solves this issue) - thanks for gracefully handling spaces in directory names automatically!

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

codex.log

from codex.

ajslater avatar ajslater commented on August 17, 2024

It is possible this specific issue has been fixed by upstream hypercorn
https://gitlab.com/pgjones/hypercorn/-/issues/179

from codex.

ajslater avatar ajslater commented on August 17, 2024

I took a look at this recently. The solution I tried was Cygwin. Am blocked on the search engine, Xapian not building on Cygwin. Xapian core doesn't seem to have a solution for that at the moment.

I would be possible to replace Xapian with another engine, but I don't think I care about Cygwin users that's much at this time.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

Thanks AJ. I tried natively building with pip in Windows again and had some similar issues. Building in WSL with Ubunto 20.04 gives a few errors and then the main page loads, but logging in doesn't work.

I'll give the docker image a go when i get a chance.

from codex.

ajslater avatar ajslater commented on August 17, 2024

As of Codex v1.1.0 the xapian binary search engine which does not run on Windows has been replaced with a pure Python search engine. As such, Codex likely runs on windows now. Either with Cygwin or the Windows Linux Subsystem. I've only gotten so far with this, but the brave can look at instructions on the README.

I hope that the WSL is as easy as using Ubuntu, but if not, I suspect Cygwin can run it.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

tried again via pip while I had a spare minute:

  Successfully uninstalled codex-0.5.8
PS C:\> pip install codex
WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
Collecting codex
  Downloading codex-0.6.8-py3-none-any.whl (7.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.7/7.7 MB 1.9 MB/s eta 0:00:00
Collecting websocket_client<2.0,>=1.2
  Downloading websocket_client-1.4.2-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.3/55.3 kB 2.8 MB/s eta 0:00:00
Collecting ansicolors<2.0,>=1.1
  Downloading ansicolors-1.1.8-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: pycountry<21.0,>=20.7 in c:\python\python38\lib\site-packages (from codex) (20.7.3)
Requirement already satisfied: djangorestframework<4.0,>=3.11 in c:\python\python38\lib\site-packages (from codex) (3.11.1)
Requirement already satisfied: fnvhash<0.2,>=0.1 in c:\python\python38\lib\site-packages (from codex) (0.1.0)
Requirement already satisfied: django<4.0,>=3.1 in c:\python\python38\lib\site-packages (from codex) (3.1)
Requirement already satisfied: django-cors-headers<4.0,>=3.2 in c:\python\python38\lib\site-packages (from codex) (3.5.0)
Requirement already satisfied: simplejson<4.0,>=3.17 in c:\python\python38\lib\site-packages (from codex) (3.17.0)
Collecting django-dark<0.2,>=0.1
  Downloading django-dark-0.1.9.tar.gz (6.7 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: requests<3.0,>=2.24 in c:\python\python38\lib\site-packages (from codex) (2.24.0)
Requirement already satisfied: bidict<0.22,>=0.21 in c:\python\python38\lib\site-packages (from codex) (0.21.0)
Collecting hypercorn[h3]<0.12.0,>=0.11.0
  Downloading Hypercorn-0.11.2-py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 2.8 MB/s eta 0:00:00
Collecting Pillow<9.0,>=8.0
  Downloading Pillow-8.4.0-cp38-cp38-win_amd64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 2.0 MB/s eta 0:00:00
Collecting watchdog<3.0,>=2.0
  Downloading watchdog-2.2.1-py3-none-win_amd64.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.0/79.0 kB 4.3 MB/s eta 0:00:00
Collecting comicbox<0.2.0,>=0.1.7
  Downloading comicbox-0.1.7-py3-none-any.whl (32 kB)
Collecting whitenoise[brotli]<6.0,>=5.2
  Downloading whitenoise-5.3.0-py2.py3-none-any.whl (19 kB)
Requirement already satisfied: stringcase<2.0,>=1.2 in c:\python\python38\lib\site-packages (from codex) (1.2.0)
Requirement already satisfied: parse<2.0,>=1.15 in c:\python\python38\lib\site-packages (from comicbox<0.2.0,>=0.1.7->codex) (1.16.0)
Requirement already satisfied: rarfile<5.0,>=4.0 in c:\python\python38\lib\site-packages (from comicbox<0.2.0,>=0.1.7->codex) (4.0)
Requirement already satisfied: asgiref~=3.2.10 in c:\python\python38\lib\site-packages (from django<4.0,>=3.1->codex) (3.2.10)
Requirement already satisfied: sqlparse>=0.2.2 in c:\python\python38\lib\site-packages (from django<4.0,>=3.1->codex) (0.3.1)
Requirement already satisfied: pytz in c:\python\python38\lib\site-packages (from django<4.0,>=3.1->codex) (2020.1)
Requirement already satisfied: h11 in c:\users\nich\appdata\roaming\python\python38\site-packages (from hypercorn[h3]<0.12.0,>=0.11.0->codex) (0.10.0)
Requirement already satisfied: toml in c:\python\python38\lib\site-packages (from hypercorn[h3]<0.12.0,>=0.11.0->codex) (0.10.1)
Requirement already satisfied: wsproto>=0.14.0 in c:\users\nich\appdata\roaming\python\python38\site-packages (from hypercorn[h3]<0.12.0,>=0.11.0->codex) (0.15.0)
Requirement already satisfied: priority in c:\users\nich\appdata\roaming\python\python38\site-packages (from hypercorn[h3]<0.12.0,>=0.11.0->codex) (1.3.0)
Requirement already satisfied: h2>=3.1.0 in c:\users\nich\appdata\roaming\python\python38\site-packages (from hypercorn[h3]<0.12.0,>=0.11.0->codex) (3.2.0)
Requirement already satisfied: aioquic<1.0,>=0.9.0 in c:\users\nich\appdata\roaming\python\python38\site-packages (from hypercorn[h3]<0.12.0,>=0.11.0->codex) (0.9.6)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\python\python38\lib\site-packages (from requests<3.0,>=2.24->codex) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\python\python38\lib\site-packages (from requests<3.0,>=2.24->codex) (2020.6.20)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\python\python38\lib\site-packages (from requests<3.0,>=2.24->codex) (1.25.9)
Requirement already satisfied: idna<3,>=2.5 in c:\python\python38\lib\site-packages (from requests<3.0,>=2.24->codex) (2.9)
Requirement already satisfied: Brotli in c:\users\nich\appdata\roaming\python\python38\site-packages (from whitenoise[brotli]<6.0,>=5.2->codex) (1.0.7)
Requirement already satisfied: cryptography>=2.5 in c:\python\python38\lib\site-packages (from aioquic<1.0,>=0.9.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (2.9.2)
Requirement already satisfied: pylsqpack<0.4.0,>=0.3.3 in c:\users\nich\appdata\roaming\python\python38\site-packages (from aioquic<1.0,>=0.9.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (0.3.10)
Requirement already satisfied: hpack<4,>=3.0 in c:\users\nich\appdata\roaming\python\python38\site-packages (from h2>=3.1.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (3.0.0)
Requirement already satisfied: hyperframe<6,>=5.2.0 in c:\users\nich\appdata\roaming\python\python38\site-packages (from h2>=3.1.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (5.2.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\python\python38\lib\site-packages (from cryptography>=2.5->aioquic<1.0,>=0.9.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (1.14.0)
Requirement already satisfied: six>=1.4.1 in c:\python\python38\lib\site-packages (from cryptography>=2.5->aioquic<1.0,>=0.9.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (1.15.0)
Requirement already satisfied: pycparser in c:\python\python38\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.5->aioquic<1.0,>=0.9.0->hypercorn[h3]<0.12.0,>=0.11.0->codex) (2.20)
WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
Installing collected packages: django-dark, ansicolors, whitenoise, websocket_client, watchdog, Pillow, comicbox, hypercorn, codex
  DEPRECATION: django-dark is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Attempting uninstall: whitenoise
    WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
    Found existing installation: whitenoise 5.1.0
    Uninstalling whitenoise-5.1.0:
      Successfully uninstalled whitenoise-5.1.0
  Attempting uninstall: websocket_client
    Found existing installation: websocket-client 0.57.0
    Uninstalling websocket-client-0.57.0:
      Successfully uninstalled websocket-client-0.57.0
  Attempting uninstall: watchdog
    Found existing installation: watchdog 0.10.3
    Uninstalling watchdog-0.10.3:
      Successfully uninstalled watchdog-0.10.3
  Attempting uninstall: Pillow
    WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
    Found existing installation: Pillow 7.2.0
    Uninstalling Pillow-7.2.0:
      Successfully uninstalled Pillow-7.2.0
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Python\\Python38\\Lib\\site-packages\\~-l\\_imaging.cp38-win_amd64.pyd'
Consider using the `--user` option or check the permissions.

WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\python\python38\lib\site-packages)
c:\python\python38\scripts\codex.exe
2023-01-26 12:25:56,973 MainProcess MainThread codex.settings.hypercorn INFO Loaded config from C:\config\hypercorn.toml
No changes detected in app 'codex'
Operations to perform:
  Apply all migrations: admin, auth, codex, contenttypes, sessions
Running migrations:
  No migrations to apply.
Traceback (most recent call last):
  File "C:\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "c:\python\python38\scripts\codex.exe\__main__.py", line 7, in <module>
  File "C:\Python\Python38\lib\site-packages\codex\run.py", line 90, in main
    run()
  File "C:\Python\Python38\lib\site-packages\codex\run.py", line 75, in run
    bind_signals(loop)
  File "C:\Python\Python38\lib\site-packages\codex\signals.py", line 39, in bind_signals
    loop.add_signal_handler(sig, _shutdown_signal_handler)
  File "C:\Python\Python38\lib\asyncio\events.py", line 536, in add_signal_handler
    raise NotImplementedError
NotImplementedError

I'm in the habit of just assuming things will build out on Windows natively (hi, mylar and sab) but have nothing to backup this actually being a thing that will work.

For WSL2/Ubuntu (22.04), the pre-reqs install ok, pip builds it ok, but I, er, can't work out how to run it. codex isn't recognised, and ls ~./local/bin shows me codex, but sh codex gives the below error:

~/.local/bin$ sh codex
codex: 3: import: not found
codex: 4: import: not found
codex: 5: from: not found
codex: 7: Syntax error: "(" unexpected (expecting "then")

I think I may need to either brush up on my bash, or brush up on docker.

from codex.

ajslater avatar ajslater commented on August 17, 2024

Thanks. This is actually encouraging.

It tried to install a very old version of codex (codex's current version is v1.1.3) because it was using python3.8. It seems had a very weird time with the Pillow library and ran into permissions errors trying to install dependencies.
Modern Codex requires python >=3.9 and ships with python3.11 in the docker container.

With the WSL attempt I reckon it needs PYTHONPATH declared.

Thanks again. This has renewed my motivation to try this again. I'll bet WSL is the way.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

Good catch - I've just tried again with Python 3.11, natively in Win10(22h2). Everything goes well until it tries to build the wheel for zipfile-deflated64. After installing MSVC++ build tools (I went with 2015/14.0 and 2022/14.3)

Logs for your reference:

C:\>pip -V
pip 22.3.1 from C:\Python\Python311\Lib\site-packages\pip (python 3.11)

C:\>pip install codex
Collecting codex
  Downloading codex-1.1.3-py3-none-any.whl (15.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.9/15.9 MB 2.0 MB/s eta 0:00:00
Collecting Pillow<10.0.0,>=9.1.0
  Downloading Pillow-9.4.0-cp311-cp311-win_amd64.whl (2.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 2.5 MB/s eta 0:00:00
Collecting ansicolors<2.0,>=1.1
  Using cached ansicolors-1.1.8-py2.py3-none-any.whl (13 kB)
Collecting comicbox<0.7.0,>=0.6.4
  Downloading comicbox-0.6.4-py3-none-any.whl (29 kB)
Collecting django<5.0,>=4.1
  Downloading Django-4.1.5-py3-none-any.whl (8.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 3.2 MB/s eta 0:00:00
Collecting django-cors-headers<4.0,>=3.2
  Downloading django_cors_headers-3.13.0-py3-none-any.whl (13 kB)
Collecting django-haystack<4.0.0,>=3.2.1
  Downloading django-haystack-3.2.1.tar.gz (466 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 466.6/466.6 kB 4.1 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting django-rest-registration<0.8.0,>=0.7.2
  Downloading django_rest_registration-0.7.3-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.6/56.6 kB 3.1 MB/s eta 0:00:00
Collecting django-vite<3.0.0,>=2.0.2
  Downloading django_vite-2.0.2-py3-none-any.whl (12 kB)
Collecting djangorestframework<4.0,>=3.11
  Downloading djangorestframework-3.14.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 4.0 MB/s eta 0:00:00
Collecting djangorestframework-camel-case<2.0.0,>=1.3.0
  Downloading djangorestframework-camel-case-1.3.0.tar.gz (8.2 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting drf-spectacular<0.26.0,>=0.25.0
  Downloading drf_spectacular-0.25.1-py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.5/90.5 kB 5.4 MB/s eta 0:00:00
Collecting filelock<4.0.0,>=3.4.2
  Downloading filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting filetype<2.0.0,>=1.0.12
  Downloading filetype-1.2.0-py2.py3-none-any.whl (19 kB)
Collecting fnvhash<0.2,>=0.1
  Using cached fnvhash-0.1.0.tar.gz (1.9 kB)
  Preparing metadata (setup.py) ... done
Collecting humanfriendly<11.0,>=10.0
  Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 kB 4.8 MB/s eta 0:00:00
Collecting humanize<5.0.0,>=4.0.0
  Downloading humanize-4.4.0-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.6/106.6 kB 6.0 MB/s eta 0:00:00
Collecting hypercorn[h3]<0.15.0,>=0.14.1
  Downloading Hypercorn-0.14.3-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.9/57.9 kB 1.5 MB/s eta 0:00:00
Collecting pdf2image<2.0.0,>=1.16.0
  Downloading pdf2image-1.16.2-py3-none-any.whl (11 kB)
Collecting pdfrw<0.5,>=0.4
  Downloading pdfrw-0.4-py2.py3-none-any.whl (69 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.5/69.5 kB 3.7 MB/s eta 0:00:00
Collecting pycountry<23.0,>=22.1
  Downloading pycountry-22.3.5.tar.gz (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 3.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting python-dateutil<3.0.0,>=2.8.2
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 3.8 MB/s eta 0:00:00
Collecting requests<3.0,>=2.24
  Downloading requests-2.28.2-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB ? eta 0:00:00
Collecting tzlocal<5.0,>=4.1
  Downloading tzlocal-4.2-py3-none-any.whl (19 kB)
Collecting watchdog<3.0,>=2.0
  Using cached watchdog-2.2.1-py3-none-win_amd64.whl (78 kB)
Collecting websocket_client<2.0,>=1.2
  Using cached websocket_client-1.4.2-py3-none-any.whl (55 kB)
Collecting whitenoise[brotli]<7.0,>=6.0
  Downloading whitenoise-6.3.0-py3-none-any.whl (19 kB)
Collecting whoosh<3.0.0,>=2.7.4
  Downloading Whoosh-2.7.4-py2.py3-none-any.whl (468 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.8/468.8 kB 4.2 MB/s eta 0:00:00
Collecting confuse<3.0.0,>=2.0.0
  Downloading confuse-2.0.0-py3-none-any.whl (24 kB)
Collecting deepdiff6<7.0.0,>=6.2.0
  Downloading deepdiff6-6.2.0-py3-none-any.whl (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.9/72.9 kB 3.9 MB/s eta 0:00:00
Collecting defusedxml<0.8.0,>=0.7.1
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting parse<2.0,>=1.15
  Downloading parse-1.19.0.tar.gz (30 kB)
  Preparing metadata (setup.py) ... done
Collecting rarfile<5.0,>=4.0
  Using cached rarfile-4.0-py3-none-any.whl (28 kB)
Collecting zipfile-deflate64<0.3.0,>=0.2.0
  Downloading zipfile-deflate64-0.2.0.tar.gz (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.9/62.9 kB 3.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting asgiref<4,>=3.5.2
  Downloading asgiref-3.6.0-py3-none-any.whl (23 kB)
Collecting sqlparse>=0.2.2
  Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 2.0 MB/s eta 0:00:00
Collecting tzdata
  Downloading tzdata-2022.7-py2.py3-none-any.whl (340 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 340.1/340.1 kB 4.2 MB/s eta 0:00:00
Collecting pytz
  Downloading pytz-2022.7.1-py2.py3-none-any.whl (499 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 499.4/499.4 kB 4.4 MB/s eta 0:00:00
Collecting uritemplate>=2.0.0
  Downloading uritemplate-4.1.1-py2.py3-none-any.whl (10 kB)
Collecting PyYAML>=5.1
  Downloading PyYAML-6.0-cp311-cp311-win_amd64.whl (143 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.2/143.2 kB 4.3 MB/s eta 0:00:00
Collecting jsonschema>=2.6.0
  Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 kB 2.6 MB/s eta 0:00:00
Collecting inflection>=0.3.1
  Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting pyreadline3
  Downloading pyreadline3-3.4.1-py3-none-any.whl (95 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 kB 2.7 MB/s eta 0:00:00
Collecting aioquic<1.0,>=0.9.0
  Downloading aioquic-0.9.20.tar.gz (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 153.5/153.5 kB 4.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting h11
  Downloading h11-0.14.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 1.5 MB/s eta 0:00:00
Collecting h2>=3.1.0
  Downloading h2-4.1.0-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB ? eta 0:00:00
Collecting priority
  Downloading priority-2.0.0-py3-none-any.whl (8.9 kB)
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting wsproto>=0.14.0
  Downloading wsproto-1.2.0-py3-none-any.whl (24 kB)
Requirement already satisfied: setuptools in c:\python\python311\lib\site-packages (from pycountry<23.0,>=22.1->codex) (65.5.0)
Collecting six>=1.5
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting charset-normalizer<4,>=2
  Downloading charset_normalizer-3.0.1-cp311-cp311-win_amd64.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.0/96.0 kB 5.4 MB/s eta 0:00:00
Collecting idna<4,>=2.5
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 827.4 kB/s eta 0:00:00
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.6/140.6 kB 4.1 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
  Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 3.2 MB/s eta 0:00:00
Collecting pytz-deprecation-shim
  Downloading pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Collecting Brotli
  Downloading Brotli-1.0.9-cp311-cp311-win_amd64.whl (333 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 333.1/333.1 kB 4.1 MB/s eta 0:00:00
Collecting cryptography>=3.1
  Downloading cryptography-39.0.0-cp36-abi3-win_amd64.whl (2.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 2.2 MB/s eta 0:00:00
Collecting pylsqpack<0.4.0,>=0.3.3
  Downloading pylsqpack-0.3.16.tar.gz (659 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 659.6/659.6 kB 2.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pyopenssl>=20
  Downloading pyOpenSSL-23.0.0-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.3/57.3 kB 1.5 MB/s eta 0:00:00
Collecting ordered-set<4.2.0,>=4.0.2
  Downloading ordered_set-4.1.0-py3-none-any.whl (7.6 kB)
Collecting hyperframe<7,>=6.0
  Downloading hyperframe-6.0.1-py3-none-any.whl (12 kB)
Collecting hpack<5,>=4.0
  Downloading hpack-4.0.0-py3-none-any.whl (32 kB)
Collecting attrs>=17.4.0
  Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.0/60.0 kB 3.1 MB/s eta 0:00:00
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Downloading pyrsistent-0.19.3-cp311-cp311-win_amd64.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 1.7 MB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp311-cp311-win_amd64.whl (179 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 179.0/179.0 kB 2.2 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 1.7 MB/s eta 0:00:00
Building wheels for collected packages: django-haystack, djangorestframework-camel-case, pycountry, zipfile-deflate64
  Building wheel for django-haystack (pyproject.toml) ... done
  Created wheel for django-haystack: filename=django_haystack-3.2.1-py3-none-any.whl size=141742 sha256=0d4eee6b0cc2ddfa671dd0541ddad8a775a2cf350fa3e18a74cef5f48244044b
  Stored in directory: c:\users\nich\appdata\local\pip\cache\wheels\fa\ad\f3\60909d1063b1b3d710f88952e0ff03942307dc7668ac379a5e
  Building wheel for djangorestframework-camel-case (pyproject.toml) ... done
  Created wheel for djangorestframework-camel-case: filename=djangorestframework_camel_case-1.3.0-py3-none-any.whl size=8014 sha256=d50a69b7538f6e14677cdf4159784337c7b605568c3d1ce81d8e132b2da1b9f0
  Stored in directory: c:\users\nich\appdata\local\pip\cache\wheels\27\e3\7c\485e43a77b4fcc944dfa89eaa2a95083f884f9437e6ebddb88
  Building wheel for pycountry (pyproject.toml) ... done
  Created wheel for pycountry: filename=pycountry-22.3.5-py2.py3-none-any.whl size=10681895 sha256=970e0f2db031c54fc2b3f253652d7aefff728956f922daa32513b7da2c9cf36d
  Stored in directory: c:\users\nich\appdata\local\pip\cache\wheels\d5\97\a4\08cbb9a5350fc8af871bf1178f621758179442f3acacd39b65
  Building wheel for zipfile-deflate64 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for zipfile-deflate64 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\zipfile_deflate64
      copying zipfile_deflate64\_patcher.py -> build\lib.win-amd64-cpython-311\zipfile_deflate64
      copying zipfile_deflate64\_zipfile.py -> build\lib.win-amd64-cpython-311\zipfile_deflate64
      copying zipfile_deflate64\__init__.py -> build\lib.win-amd64-cpython-311\zipfile_deflate64
      running build_ext
      building 'zipfile_deflate64.deflate64' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for zipfile-deflate64
Successfully built django-haystack djangorestframework-camel-case pycountry
Failed to build zipfile-deflate64
ERROR: Could not build wheels for zipfile-deflate64, which is required to install pyproject.toml-based projects```



With VC installed:

```Building wheels for collected packages: zipfile-deflate64
  Building wheel for zipfile-deflate64 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for zipfile-deflate64 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\zipfile_deflate64
      copying zipfile_deflate64\_patcher.py -> build\lib.win-amd64-cpython-311\zipfile_deflate64
      copying zipfile_deflate64\_zipfile.py -> build\lib.win-amd64-cpython-311\zipfile_deflate64
      copying zipfile_deflate64\__init__.py -> build\lib.win-amd64-cpython-311\zipfile_deflate64
      running build_ext
      building 'zipfile_deflate64.deflate64' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\zipfile_deflate64
      creating build\temp.win-amd64-cpython-311\Release\zipfile_deflate64\deflate64
      creating build\temp.win-amd64-cpython-311\Release\zlib
      creating build\temp.win-amd64-cpython-311\Release\zlib\contrib
      creating build\temp.win-amd64-cpython-311\Release\zlib\contrib\infback9
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Izlib -Izlib/contrib/infback9 -IC:\Python\Python311\include -IC:\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tczipfile_deflate64/deflate64/deflate64module.c /Fobuild\temp.win-amd64-cpython-311\Release\zipfile_deflate64/deflate64/deflate64module.obj
      deflate64module.c
      c:\python\python311\include\pyconfig.h(207): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for zipfile-deflate64
Failed to build zipfile-deflate64
ERROR: Could not build wheels for zipfile-deflate64, which is required to install pyproject.toml-based projects
```

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

WSL may be working ok for now!

Set a library to /mnt/e/usenet/comics, added a group with my non-admin/user account, and it can see some things. May be a permissions issue, or I may need to set my windows librrary folder as a network share and mount that

eg


2023-01-26 17:14:06 AEDT INFO     Updated library /mnt/e/usenet/comics in 0 seconds.
2023-01-26 17:14:07 AEDT WARNING  Forbidden: /api/v3/admin/librarian/status
2023-01-26 17:14:07 AEDT WARNING  Forbidden: /api/v3/admin/failed-import
2023-01-26 17:14:07 AEDT WARNING  Forbidden: /api/v3/admin/library
2023-01-26 17:14:09 AEDT WARNING  Forbidden: /api/v3/admin/librarian/status
Indexing 2 Issues
2023-01-26 17:14:11 AEDT WARNING  Forbidden: /api/v3/admin/librarian/status
2023-01-26 17:14:12 AEDT WARNING  Forbidden: /api/v3/admin/librarian/status
2023-01-26 17:15:05 AEDT WARNING  Import apply waited for the filesystem to stop changing too long. Try polling again once files have finished copying.
2023-01-26 17:15:05 AEDT WARNING  Forbidden: /api/v3/admin/librarian/status

from codex.

ajslater avatar ajslater commented on August 17, 2024

Well, worse comes to worse I could always drop zipfile-deflated64, but they advertise that they publish windows wheels on pypi. Good progress! I have hopes that next week I'll be able to get this working.

With the WSL logs, those warnings usually happen when someone tries to access the admin web pages when not logged in with a current session token, as often happend in development when I leave a browser open and logged in but reinstall the backend underneath it. Logout and login again and you may see working admin pages.

from codex.

killo3967 avatar killo3967 commented on August 17, 2024

When you have time, please consider to write a documentacion who to install in WSL.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

Grain of salt, maybe this is useful - but I figured I may as well smash my head against this wall again rather than actually reading any comics : )

Installing via pip using Windows/Powershell caused such a mess

  • no errors seemingly when building
  • after starting Codex, fails to open in a browser (well I guess it has a themed 'this isn't working' error...)

Installing via pip using WSL2/Ubuntu 22.04.4 LTS mostly works

  • it builds ok
  • feeding it small folders to create libraries from and they index v.quickly
  • feeding it an entire 570GB library (~16k files, 2120 folders) and it chokes, hard
    -- each poll adds 1 issue before this message:
    -- WARNING Import apply waited for the filesystem to stop changing too long. Try polling again once files have finished copying.

For WSL I tried creating a library both via /mnt/path/to/comics via the mapped filesystem, as well as creating a network share in Windows and then mounting it within Ubuntu

sudo mkdir /mnt/comics
sudo mount -t drvfs '\\host\comics' /mnt/comics

same result both ways, unfortunately

Same results before and after updating python

$ pip -V
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

$ python3 -V
Python 3.10.6

$ sudo apt update && sudo apt upgrade

$ pip3 -V
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

$ python3 -V
Python 3.10.12

I was in the mood for getting my head around OPDS (which is what brought me to installing Codex again). I couldn't get Codex added to Moon+ Reader as a library, but it did work for Mylar. When comparing Mylar's OPDS feed in a reader, vs Codex via a browser, I noted Mylar showing the reading order correctly. Codex seemed to struggle to show it, as a bunch of titles were missing the required metadata (missing publisher, missing reading order, mangled publishing dates, etc). Hoping when I can get Codex up and going properly and not choking on my library, I can then focus on the OPDS side of things.

Happy to try further testing with Codex installed natively via WSL, but otherwise I guess I'll give the docker path a try next.

@killo3967 if it's not too late, the WSL build for me was just pip3 install codex, but I already had python and pip etc installed from previous years.

On the topic of the Debian build instructions in the readme, @ajslater

$ sudo apt install build-essential libimagequant0 libjpeg62-turbo libopenjp2-7 libssl3 libyaml-0-2 libtiff6 libwebp7 python3-dev python3-pip mupdf unrar zlib1g

Package libjpeg62-turbo is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libjpeg62-turbo' has no installation candidate
E: Unable to locate package libtiff6

from codex.

ajslater avatar ajslater commented on August 17, 2024

That's interesting. The import warning you're getting is from codex comparing the aggregate directory size from one second to the next to see if you're in the middle of moving files, in which case it halts the import until the size remains the same from one check to the next, hopefully indicating that the move has finished. It's likely that this is running into a difference with Windows or NTFS. This is a good test case for when I get back to testing on Windows. Thanks!
But if you want it to work I'd go with Docker for the moment.

Codex uses binary image libraries to make the cover thumbnails. The versions available for WSL are likely different than the example Debian (Ubuntu 24.04). I've included some new instructions on the README for searching for appropriate versions for your flavor of Debian using apt-cache.

I'll also compare Mylar and Codex OPDS metadata for an upcoming release and check out those fields you mentioned were missing or bad.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

I'll have a quick play again next week, but it's potentially worth noting something from last night's poking around:

I copied my /comics folder to a spare drive and set the share to have full access to anything connecting (but also there's no Mylar etc touching the folder structure, and no plex touching the disk as a whole). SMB2 share with a local windows account.

When adding this to the version of Codex running natively within WSL2 (Ubuntu 22.04 LTS), I had the same issues with it seeing the folders as busy.

I setup the Homeassistant addin for Codex as well, out of curiosity, because it's running in a separate VM (HAOS). The only significant difference in settup is that adding the SMB share to HA asked for credentials to use, and that wasn't specified within WSL or Codex natively. The HA version, looking at the same share mount, was.... not able to handle the entire folder contents, but ~15k files is a good start.

The HA version of Codex was able to progress far enough that Librarian Tasks showed actual progress, rather than WSL saying it's polling the folder and my relying on the shell window open to see logs on how little it's actually processing.

re: the new set of dependencies to apt install, it looks like ibjpeg-turbo8 found a match! I'll check in next week (hopefully) with progress (and see if I need to manually define permissions in fstab or something)

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

Assorted notes:

  • mounting the network share manually seems to avoid whatever filesystem issues are introduced via the WSL2 default mapping of /mnt/driveletter/folder directly with drvfs. I'm still using a Windows share, as I have Mylar running natively within Windows and that's where it places data
sudo mkdir /mnt/data/comics_smb3
sudo mount -t smb3 //server/comics /mnt/data/comics_smb3 -o vers=3.1.1,defaults,username='comics',password='password'
  • with the above change, Codex is now processing all files in a timely manner
    • I couldn't get fstab reading correctly, so manually defined the mount within /etc/wsl.conf 🤷‍♀️
    • for reference:
mount | grep /mnt/data/
//server/comics_smb3 on /mnt/data/comics_smb3 type smb3 (rw,relatime,vers=3.1.1,cache=strict,username=comics,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.2.81,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)
  • this works great for accessing it all via a browser on my Windows desktop, but I can't get eg my phone's Moonreader app to see the OPDS feed, or even the browser to load Codex without OPDS. This looks like a quirk with how WSL2 handles network access from anything that isn't the Windows host it runs on. I had a look at enabling mirroredmode networking (WSL2, WIn11 above a certain version), but can't get it enabling properly
  • I had a play with setting up Codex within my my nginx reverse proxy, but when using the defaults from https://github.com/ajslater/codex I got a few errors that nginx wasn't happy with, and when working around those, Codex no longer processes authentication via that method
  • when monitoring the console log while the latest version (1.6.3) of Codex starts up and runs, I'm seeing a whole bunch of errors that look related to Django (and are probably why I can now log into Codex in a browser but the Logout button is no longer giving a URL
/home/nich/.local/lib/python3.10/site-packages/django/http/response.py:517: Warning: StreamingHttpResponse must consume synchronous iterators in order to serve them asynchronously. Use an asynchronous iterator instead.
  warnings.warn(
[2024-07-04 00:53:20 +1000] [11222] [ERROR] Error in ASGI Framework
Traceback (most recent call last):
  File "/home/nich/.local/lib/python3.10/site-packages/hypercorn/asyncio/task_group.py", line 27, in _handle
    await app(scope, receive, send, sync_spawn, call_soon)
  File "/home/nich/.local/lib/python3.10/site-packages/hypercorn/app_wrappers.py", line 34, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/channels/routing.py", line 62, in __call__
    return await application(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/channels/security/websocket.py", line 37, in __call__
    return await self.application(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/channels/sessions.py", line 47, in __call__
    return await self.inner(dict(scope, cookies=cookies), receive, send)
  File "/usr/local/lib/python3.10/dist-packages/channels/sessions.py", line 263, in __call__
    return await self.inner(wrapper.scope, receive, wrapper.send)
  File "/usr/local/lib/python3.10/dist-packages/channels/auth.py", line 185, in __call__
    return await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/channels/middleware.py", line 24, in __call__
    return await self.inner(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/channels/routing.py", line 116, in __call__
    raise ValueError("No route found for path %r." % path)
ValueError: No route found for path '/api/v3/ws'.
  • I'm also seeing a few dozen errors come up about not finding files within given paths, but I suspect this could be another issue related to WSL2 and permissions/filesystem translation
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/data/comics_e/What If... Venom (2024)/What If? Venom 001 (2024) (Digital) (Walkabout-Empire).cbz'
2024-07-07 15:09:00 AEST ERROR   Error preparing failed import create for /mnt/data/comics_e/What If... Venom (2024)/What If? Venom 003 (2024) (Digital) (Wanpanman-Empire).cbz
Traceback (most recent call last):
  File "/home/nich/.local/lib/python3.10/site-packages/codex/librarian/importer/failed_imports.py", line 115, in _bulk_create_failed_imports
    fi.presave()
  File "/home/nich/.local/lib/python3.10/site-packages/codex/models/paths.py", line 49, in presave
    self.set_stat()
  File "/home/nich/.local/lib/python3.10/site-packages/codex/models/paths.py", line 32, in set_stat
    st_record = path.stat()
  File "/usr/lib/python3.10/pathlib.py", line 1097, in stat
    return self._accessor.stat(self, follow_symlinks=follow_symlinks)
    • if I CD into the path I can LS and confirm the file is there, but if I LS the full path to the file it can't see it
ls '/mnt/data/comics_e/What If... Venom (2024)/What If? Venom 003 (2024) (Digital) (Wanpanman-Empire).cbz'
ls: cannot access '/mnt/data/comics_e/What If... Venom (2024)/What If? Venom 003 (2024) (Digital) (Wanpanman-Empire).cbz': No such file or directory

ls -lh '/mnt/data/comics_e/What If... Venom (2024)/'
total 336M
-rwxr-xr-x 1 root root 75M Jun  7 02:01 'What If... Venom 004 (2024) (Digital) (F) (Wanpanman-Empire).cbz'
-rwxr-xr-x 1 root root 88M Jun  6 12:56 'What If... Venom 005 (2024) (Digital) (Wanpanman-Empire).cbz'
-rwxr-xr-x 1 root root 55M Jun 13 02:00 'What If? Venom 001 (2024) (Digital) (Walkabout-Empire).cbz'
-rwxr-xr-x 1 root root 51M Mar 14 00:33 'What If? Venom 002 (2024) (Digital) (Walkabout-Empire).cbz'
-rwxr-xr-x 1 root root 67M Apr 18 00:22 'What If? Venom 003 (2024) (Digital) (Wanpanman-Empire).cbz'
-rwxr-xr-x 1 root root 639 Jun 12 10:43  series.json

from codex.

ajslater avatar ajslater commented on August 17, 2024

What I read seems to indicate that ? is a forbidden character in windows filesystems. I wonder if it's being removed or translated badly the long chain of network and virtualization happening here.

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

Putting this up so other people can test with it and we can try to wrangle any bugs. I've tested this with Ubuntu 22.04.4 LTS and 24.04 LTS

Once you have WSL2 installed and you've created your first account, log into your terminal:

Make sure your install is up-to-date:

sudo apt update && sudo apt upgrade
python3 -V

Install some pre-reqs:

sudo apt install build-essential libimagequant0 libjpeg-turbo8 libopenjp2-7 libssl-dev libyaml-0-2 libtiff6 libwebp7 python3-dev python3-pip mupdf unrar zlib1g

Create a directory to store your Codex profile:

mkdir -p usenet/codex
cd usenet/codex

Install Codex! We should look at how to do this properly without breaking things (venvs maybe?):

pip3 install codex --break-system-packages 

This may help stop some errors about Codex not being in the PATH

export PATH=$PATH:/Home/user/.local/bin

Lets skip the default WSL mount-points for drives! Assuming your comics library is on a NTFS/Windows drive, you'll need to create a share within Windows and set a local username and password.

Create Linux folder you're mounting the share to:

sudo mkdir -p /mnt/data/comics

Mount the Windows share to the above folder:

sudo mount -t smb3 //server/comics /mnt/data/comics -o vers=3.1.1,defaults,username='comics',password='password'

Test your library mounted correctly:

ls /mnt/data/comics | less

Start Codex for the first time (Make sure you're in the ~/usenet/codex or whatever folder you want the data created within):

LOGLEVEL=DEBUG codex 

As you open Codex in a browser (localhost:9810), login to the default account and add a library, keep an eye on the terminal window and its logs to see what errors you get.

The SMB3 mount command should allow Codex to quickly scan your library, rather than eg
WARNING Import apply waited for the filesystem to stop changing too long. Try polling again once files have finished copying.

The mount -t smb3 command will either need to be run at each restart of the WSL2 VM, or be added to wsl.conf or fstab to automount on login

from codex.

professionaltart avatar professionaltart commented on August 17, 2024

What I read seems to indicate that ? is a forbidden character in windows filesystems. I wonder if it's being removed or translated badly the long chain of network and virtualization happening here.

I can't rule that out, but it looked like there were some unicode characters in there. Replacing the '?' with a manually typed one fixed those specific files, and replacing the '...' (actually a single-character elipsis) with three actual periods worked for the other files.

Codex reported a few dozen actual issues it couldn't import, but I haven't needed to read any of those yet and so haven't looked any further into why (other than initially wondering if it was due to most of them using rar instead of zip archives)

from codex.

ajslater avatar ajslater commented on August 17, 2024

Renaming the files is certainly the simplest and most reliable way of handling this, but I read this today and was wondering if adding iocharset=iso8859-1 to to smb3 mount options might have a positive effect.

Thanks again for the installation summary. I'll be including that in the README from now on.

from codex.

ajslater avatar ajslater commented on August 17, 2024

Codex v1.6.9 now includes Windows installation instructions in the README graciously cribbed from @professionaltart's experiments.

from codex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.