-
Notifications
You must be signed in to change notification settings - Fork 43
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
Custom configuration path does not work #201
Comments
Okay, can you tell me where is your configuration file located, so I can try to replicate the issue ? |
It is located in the same directory as my python script. But this should
not matter. Without having one in one of the hardcoded places the code will
always crash.
Op vr 4 aug. 2017 11:17 schreef Denis Moreno <notifications@github.com>:
… Okay, can you tell me where is your configuration file located, so I can
try to replicate the issue ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACZxI5wdU-gatHjp1XdFHQydg25eN4MLks5sUuHAgaJpZM4OrPh4>
.
|
Yes, you can only use the api if you provide a valid configuration to connect to a LIMS instance. We allow this file to be placed in several predetermined locations. I'm not quite sure what the issue is with this, could you explain your issue further ? |
Sure! According to the docstring in config.py there is an alternative way
of supplying configuration files, which was implemented in the earlier
mentioned pull request. I can't get this alternative way to work so I was
wondering how I should implement it. The problem is that as soon as I try
to load config.py it will try to look for the configuration files and thus
the alternative method does not work.
This is the docstring:
```python
'''
Usage:
from genologics.config import BASEURI, USERNAME, PASSWORD
Alternate Usage:
from genologics import config
BASEURI, USERNAME, PASSWORD, VERSION, MAIN_LOG =
config.load_config(specified_config = <path to config file>)
'''
```
Op vr 4 aug. 2017 16:11 schreef Denis Moreno <notifications@github.com>:
… Yes, you can only use the api if you provide a valid configuration to
connect to a LIMS instance. We allow this file to be placed in several
predetermined locations.
I'm not quite sure what the issue is with this, could you explain your
issue further ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACZxI0MAYskEtqWGgwRfRC1HM4XAS6Nhks5sUyZ-gaJpZM4OrPh4>
.
|
Interesting, as you noticed, that definitely won't work. I do not have an issue with allowing people to provide their own conf without using the default hardcoded ones, so if you're interested, you're welcome to put in a PR for that. |
In #146 a flexible way declaring the configuration file location was implemented. Unfortunately, I can't get it to work.
This is how my (very simple) test script looks like:
When I run this it immediately starts complaining about the missing config files.
I am using the latest (pip) version of the package. Any idea how to get this to work?
The text was updated successfully, but these errors were encountered: