[BUG] Sample config not working
Closed this issue · 16 comments
Using dooit v3.0.2 and dooit-extras v0.1.0
Copied the Catpuccin sample config into my config file ~/.config/dooit/config.py
. However no changes are observed in dooit. Am I missing a step?
I tried a minimal config instead and still no joy. I believe there might be an issue with pipx install dooit-extras
. Maybe due to this warning?
⚠️ File exists at /home/me/.local/bin/dooit and points to /home/me/.local/pipx/venvs/dooit/bin/dooit, not /home/me/.local/pipx/venvs/dooit-extras/bin/dooit. Not modifying.
Tried installing via the AUR instead but that fails straight away due to python-textual
not having the latest version available on the AUR
Hi @silentjay,
I guess pipx is a no-go since dooit-extras is a library and not an actual binary that can run
Even pipx includes this warning:
If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead.
Tried installing via the AUR instead but that fails straight away due to python-textual not having the latest version available on the AUR
That is weird, I just tried with yay and it worked? Can you share some logs?
My Logs
test@21e26e542e31 ~/yay (master) [127]> yay -S dooit
AUR Explicit (1): dooit-3.0.2-1
Sync Dependency (9): python-3.12.7-1, python-pyperclip-1.9.0-1, python-platformdirs-4.3.6-1, python-dateutil-2.9.0-5, python-yaml-6.0.2-1, python-click-8.1.7-3, python-textual-0.85.2-1, python-tzlocal-1:5.2-2, python-sqlalchemy-2.0.36-1
Sync Make Dependency (4): python-wheel-0.44.0-2, python-build-1.2.2-1, python-poetry-core-1.9.0-5, python-installer-0.7.0-8
:: (1/1) Downloaded PKGBUILD: dooit
1 dooit (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
1 dooit (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
==> Making package: dooit 3.0.2-1 (Tue Nov 12 00:55:36 2024)
==> Retrieving sources...
-> Downloading dooit-3.0.2.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1375k 0 1375k 0 0 615k 0 --:--:-- 0:00:02 --:--:-- 1234k
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
dooit-3.0.2.tar.gz ... Passed
:: Remove make dependencies after install? [y/N]
:: (1/1) Parsing SRCINFO: dooit
resolving dependencies...
looking for conflicting packages...
Package (28) New Version Net Change Download Size
extra/libyaml 0.2.5-3 0.18 MiB 0.06 MiB
core/mpdecimal 4.0.0-2 0.32 MiB 0.10 MiB
extra/python-colorama 0.4.6-3 0.25 MiB 0.05 MiB
extra/python-fastjsonschema 2.20.0-1 0.27 MiB 0.05 MiB
extra/python-greenlet 3.1.0-1 0.44 MiB 0.12 MiB
extra/python-lark-parser 1.2.2-1 1.22 MiB 0.25 MiB
extra/python-markdown-it-py 3.0.0-2 0.68 MiB 0.14 MiB
extra/python-mdurl 0.1.2-5 0.06 MiB 0.02 MiB
extra/python-packaging 24.1-1 0.49 MiB 0.10 MiB
extra/python-pygments 2.18.0-1 14.10 MiB 2.29 MiB
extra/python-pyproject-hooks 1.2.0-1 0.10 MiB 0.02 MiB
extra/python-rich 13.9.4-1 3.13 MiB 0.51 MiB
extra/python-six 1.16.0-9 0.11 MiB 0.03 MiB
extra/python-typing_extensions 4.12.2-1 0.41 MiB 0.07 MiB
extra/python-uc-micro-py 1.0.3-2 0.02 MiB 0.01 MiB
core/python 3.12.7-1 70.07 MiB 12.31 MiB
extra/python-build 1.2.2-1 0.20 MiB 0.05 MiB
extra/python-click 8.1.7-3 1.18 MiB 0.20 MiB
extra/python-dateutil 2.9.0-5 0.99 MiB 0.29 MiB
extra/python-installer 0.7.0-8 0.18 MiB 0.04 MiB
extra/python-platformdirs 4.3.6-1 0.24 MiB 0.03 MiB
extra/python-poetry-core 1.9.0-5 1.26 MiB 0.22 MiB
extra/python-pyperclip 1.9.0-1 0.09 MiB 0.02 MiB
extra/python-sqlalchemy 2.0.36-1 24.88 MiB 3.23 MiB
extra/python-textual 0.85.2-1 7.48 MiB 1.12 MiB
extra/python-tzlocal 1:5.2-2 0.17 MiB 0.04 MiB
extra/python-wheel 0.44.0-2 0.26 MiB 0.06 MiB
extra/python-yaml 6.0.2-1 0.95 MiB 0.19 MiB
Total Download Size: 21.60 MiB
Total Installed Size: 129.72 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
python-3.12.7-1-x86_64 downloading...
python-sqlalchemy-2.0.36-1-x86_64 downloading...
python-pygments-2.18.0-1-any downloading...
python-textual-0.85.2-1-any downloading...
python-rich-13.9.4-1-any downloading...
python-dateutil-2.9.0-5-any downloading...
python-lark-parser-1.2.2-1-any downloading...
python-poetry-core-1.9.0-5-any downloading...
python-click-8.1.7-3-any downloading...
python-yaml-6.0.2-1-x86_64 downloading...
python-markdown-it-py-3.0.0-2-any downloading...
python-greenlet-3.1.0-1-x86_64 downloading...
mpdecimal-4.0.0-2-x86_64 downloading...
python-packaging-24.1-1-any downloading...
python-typing_extensions-4.12.2-1-any downloading...
python-wheel-0.44.0-2-any downloading...
libyaml-0.2.5-3-x86_64 downloading...
python-colorama-0.4.6-3-any downloading...
python-fastjsonschema-2.20.0-1-any downloading...
python-build-1.2.2-1-any downloading...
python-installer-0.7.0-8-any downloading...
python-tzlocal-1:5.2-2-any downloading...
python-platformdirs-4.3.6-1-any downloading...
python-six-1.16.0-9-any downloading...
python-pyperclip-1.9.0-1-any downloading...
python-pyproject-hooks-1.2.0-1-any downloading...
python-mdurl-0.1.2-5-any downloading...
python-uc-micro-py-1.0.3-2-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing mpdecimal...
installing python...
Optional dependencies for python
python-setuptools: for building Python packages using tooling that is usually bundled with Python
python-pip: for installing Python packages using tooling that is usually bundled with Python
python-pipx: for installing Python software not packaged on Arch Linux
sqlite: for a default database integration [installed]
xz: for lzma [installed]
tk: for tkinter
installing python-pyperclip...
Optional dependencies for python-pyperclip
xclip: xclip backend
xsel: xsel backend
wl-clipboard: wl-clipboard backend
plasma-workspace: klipper backend
installing python-fastjsonschema...
installing python-typing_extensions...
installing python-lark-parser...
Optional dependencies for python-lark-parser
python-atomicwrites: for atomic_cache
python-regex: for regex support
python-js2py: for nearley support
installing python-packaging...
installing python-poetry-core...
installing python-colorama...
installing python-uc-micro-py...
installing python-mdurl...
installing python-markdown-it-py...
Optional dependencies for python-markdown-it-py
python-mdit_py_plugins: core plugins
installing python-pygments...
installing python-rich...
installing python-platformdirs...
installing python-textual...
Optional dependencies for python-textual
python-tree-sitter: for syntax highlighting support
python-tree-sitter-languages: for custom languages support
python-textual-dev: tools for developers
installing python-six...
installing python-dateutil...
installing python-click...
installing libyaml...
installing python-yaml...
installing python-pyproject-hooks...
installing python-build...
Optional dependencies for python-build
python-pip: to use as the Python package installer (default)
python-uv: to use as the Python package installer
python-virtualenv: to use virtualenv for build isolation
installing python-wheel...
Optional dependencies for python-wheel
python-keyring: for wheel.signatures
python-xdg: for wheel.signatures
installing python-installer...
installing python-greenlet...
installing python-sqlalchemy...
Optional dependencies for python-sqlalchemy
python-psycopg2: connect to PostgreSQL database
installing python-tzlocal...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Making package: dooit 3.0.2-1 (Tue Nov 12 00:55:51 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found dooit-3.0.2.tar.gz
==> Validating source files with sha256sums...
dooit-3.0.2.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting dooit-3.0.2.tar.gz with bsdtar
==> Sources are ready.
==> Making package: dooit 3.0.2-1 (Tue Nov 12 00:55:52 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
* Getting build dependencies for wheel...
* Building wheel...
Successfully built dooit-3.0.2-py3-none-any.whl
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "dooit"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: dooit 3.0.2-1 (Tue Nov 12 00:55:55 2024)
==> Cleaning up...
loading packages...
resolving dependencies...
looking for conflicting packages...
Package (1) New Version Net Change
dooit 3.0.2-1 0.59 MiB
Total Installed Size: 0.59 MiB
:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing dooit...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
test@21e26e542e31 ~/yay (master)> dooit
Thanks, had to do an system update then run yay, think my mirrors were out of date.
Still can't get a minimal config working e.g.
~/.config/dooit/config.py
from dooit.ui.api import DooitAPI, subscribe
from dooit.ui.api.events import Startup
from dooit.ui.api.widgets import TodoWidget, WorkspaceWidget
@subscribe(Startup)
def layout_setup(api: DooitAPI, _):
api.layouts.workspace_layout = [WorkspaceWidget.description]
api.layouts.todo_layout = [
TodoWidget.urgency,
TodoWidget.status,
TodoWidget.description,
TodoWidget.recurrence,
TodoWidget.due,
]
Still can't get a minimal config working e.g.
Wdym by not working
?
There are no changes to dooit when ran, it uses the default config. Can't help but think i'm missing a step somewhere?
Very weird, although the snippet you shared looks very similar to the defaults so you did not notice? idk. Can you maybe try a sample config from here
That way you'll know for sure if things aren't working?
I've tried all 3 sample configs, and the minimal config I posted earlier just had one change in the TodoWidget
order to make it as minimal as possible.
Fixed it! There was a __pycache__
folder hanging around in ~/.config/dooit/
probably from the previous version. Nuked it and the config is now taking effect.
Woah wth. I'll have to add this in the docs. Glad it worked out !
Happy Ricing
Did we solve your problem?
Glad we could help!
Consider sponsoring my work through github sponsors 😄
– @kraanzu
Need to test it a little more but looks like I have to nuke __pycache__
on each config change for those changes to be updated.
You can also set this environment variable:
export PYTHONDONTWRITEBYTECODE=1
Thanks, I'll have a think about that as it'll effect all my system wide python scripts.
Turns out every time you close down dooit, if you don't wipe the pycache before reopening it reverts to the default config, regardless if you make changes to it or not. The actual config files contents remains the same though.
That is very weird. I'll take a look into it today. You're using Arch right?
Yup on Arch. I tried swapping in the different sample configs, same issue.
If I delete pycache then the config loads successful. If I then close dooit and run again, the new config is shown briefly, maybe a second or two, then it reverts back to the default config. Subsequent reloads of dooit will never show the new config, even briefly. Very strange behavior.
This happens for me too on fedora KDE and it was driving me crazy. Is there no build-in way to reload the config without having to figure out that you need to manually remove the pycache folder in the config-loc?
Hi @ingur and @silentjay.
Unfortunately I can't replicate the behaviour on my machine. However I had some doubts so I tweaked a few things in the develop branch, can you install it via pip (in a virtual environment) and check if the behaviour is replicated?
In the virtual env, you can do
pip install git+https://github.com/dooit-org/dooit.git@develop
pip install dooit-extras
Lemme know if this fixes it