hexadecimalDinosaur/octoprint-cli

Cannot Define config.ini Path

Opened this issue · 0 comments

Discussed in #29

Originally posted by Brettem January 27, 2023
Describe the bug:
I am unable to get octoprint-cli to recognize it's own config file. I created a new directory on my local device and created a config.ini file within it using the template provided. However, no matter how I try to call the -c command I cannot define the config path so no other function will run.

To Reproduce
Steps to reproduce the behavior:

pip install octoprint-cli

octoprint-cli -c .\config.ini
>>>Invalid or Missing Arguments

octoprint-cli -c ".\config.ini"
>>>Invalid or Missing Arguments

octoprint-cli -c=.\config.ini
>>>usage: octoprint-cli [-h] [-c CONFIG_PATH] [-v]
                     {version,continuous,layers,gcode,print,connection,temp,system,files}
                     ...
>>>octoprint-cli: error: invalid choice: '.\\config.ini' (choose from 'version', 'continuous', 'layers', 'gcode', 'print', 'connection', 'temp', 'system', 'file
s')

octoprint-cli version
>>>Configuration file is not complete or does not exist

No matter what I try I am unable to get the app to recognize the config file I created. It appears that the octoprint-cli doesn't like my argument format but I'm not sure how else to configure it if I am just trying to define the path to the config file required for all positional arguments.

Expected behavior:
After cd into directory where created config file is located, run >octoprint-cli -c ".\config.ini" and config path is redefined.

Environment Information:

OS: [e.g. iOS] both OctoPi and Windows 11
Version 3.3.2 (cuurent)
Python Version: 3,8,8
Dependency versions
OctoPrint version: current
3D Printer Model: Prusa i3 Mk3S+