martomi / chiadog

A watch dog providing a peace in mind that your Chia farm is running smoothly 24/7.
MIT License
460 stars 123 forks source link

Dateutil module not working. #332

Closed BeepBo0 closed 2 years ago

BeepBo0 commented 2 years ago

Hi y'all. Been trying to get this sorted on my offtime but have officially run out of ideas. No matter what I try the dateutil module just doesn't work. I have tried this both on Windows10 and Windows Server 2019 with similar results. I am now throwing myself at the mercy of someone smarter than me.

Having followed the listed guide exactly on both systems, I can never get the module to work within the script.

PS C:\Users\Administrator\Documents\ChiaDog> pip install python-dateutil Requirement already satisfied: python-dateutil in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (2.8.2) Requirement already satisfied: six>=1.5 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from python-dateutil) (1.16.0)

PS C:\Users\Administrator\Documents\ChiaDog> pip check python-dateutil No broken requirements found.

PS C:\Users\Administrator\Documents\ChiaDog> .\start.cmd Traceback (most recent call last): File "C:\Users\Administrator\Documents\ChiaDog\main.py", line 12, in from src.chia_log.handlers.daily_stats.stats_manager import StatsManager File "C:\Users\Administrator\Documents\ChiaDog\src\chia_log\handlers__init.py", line 14, in from .daily_stats.stats_manager import StatsManager File "C:\Users\Administrator\Documents\ChiaDog\src\chia_log\handlers\daily_stats\init__.py", line 5, in from ...parsers.finished_signage_point_parser import FinishedSignagePointMessage File "C:\Users\Administrator\Documents\ChiaDog\src\chia_log\parsers\finished_signage_point_parser.py", line 9, in from dateutil import parser as dateutil_parser ModuleNotFoundError: No module named 'dateutil'

What am I doing wrong?

Environment:

pieterhelsen commented 2 years ago

I assume you've found what was wrong? :)

Just for the sake of anyone stumbling onto this thread. The problem was likely that you were installing the dateutils package in your global python environment, but chiadog runs in a venv, a virtual environment or a sandbox, which does not have access to the globally installed packages.

Make sure to follow the steps on https://github.com/martomi/chiadog/blob/main/WINDOWS.md#11-powershellnative-installation especially step 3. which initializes and enables the venv.

BeepBo0 commented 2 years ago

I assume you've found what was wrong? :)

Just for the sake of anyone stumbling onto this thread. The problem was likely that you were installing the dateutils package in your global python environment, but chiadog runs in a venv, a virtual environment or a sandbox, which does not have access to the globally installed packages.

Make sure to follow the steps on https://github.com/martomi/chiadog/blob/main/WINDOWS.md#11-powershellnative-installation especially step 3. which initializes and enables the venv.

Yep, I finally crack and post the question, only to get it sorted a few minutes later, typical! It was indeed an issue where the requirements didn't carry over the first time I tried it. And me being a doris kept trying to update the actual module and not the venv like you say.

But a big thanks for the help! Seeing as you are here, whats a good website to ping? I tried 8.8.8.8 and google.com but it just says "Failed to ping keep-alive: unknown url type". Apart from that works great!

pieterhelsen commented 2 years ago

For the keep_alive you mean? I've not used the feature myself, but I believe Martin uses HealthChecks.io, as suggested here

BeepBo0 commented 2 years ago

For the keep_alive you mean? I've not used the feature myself, but I believe Martin uses HealthChecks.io, as suggested here

Awesome, many thanks!