Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check chia installed tool or with path #1043

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions config.yaml.default
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This is a single variable that should contain the location of your chia executable file. This is the blockchain executable.
#
# WINDOWS EXAMPLE: C:\Users\Swar\AppData\Local\chia-blockchain\app-1.1.5\resources\app.asar.unpacked\daemon\chia.exe
# LINUX EXAMPLE: /usr/lib/chia-blockchain/resources/app.asar.unpacked/daemon/chia
# LINUX2 EXAMPLE: /home/swar/chia-blockchain/venv/bin/chia
# MAC OS EXAMPLE: /Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon/chia
# WINDOWS EXAMPLE: C:\Users\Swar\AppData\Local\chia-blockchain\app-1.1.5\resources\app.asar.unpacked\daemon\chia.exe
# LINUX EXAMPLE: /usr/lib/chia-blockchain/resources/app.asar.unpacked/daemon/chia
# LINUX2 EXAMPLE: /home/swar/chia-blockchain/venv/bin/chia
# MAC OS EXAMPLE: /Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon/chia
# CHIA ON PATH VAR: only 'chia' for LINUX and MAC and 'chia.exe' for WINDOWS
chia_location:


Expand Down
3 changes: 2 additions & 1 deletion plotmanager/library/utilities/configuration.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
from shutil import which

from plotmanager.library.utilities.exceptions import InvalidChiaLocationException, MissingImportError


def test_configuration(chia_location, notification_settings, instrumentation_settings):
if not os.path.exists(chia_location):
if which(chia_location) is None:
raise InvalidChiaLocationException('The chia_location in your config.yaml does not exist. Please confirm if '
'you have the right version. Also confirm if you have a space after the '
'colon. "chia_location: <DRIVE>" not "chia_location:<DRIVE>"')
Expand Down