Comments (7)
Hi @IyobedZekarias , promptflow will create an encryption key to keyring when first use, the error raised seems because your local sqlite db has existing connections but encryption key not found in keyring, could you please try to delete the local db file (at ~/.promptflow/pf.sqlite) and have a next try?
from promptflow.
ok this ended up working but it creates a new pf.sqlite file whenever I create a new connection and I have to delete again
from promptflow.
The pf.sqlite is required to store connections, you don't need to care about it once it works. The db needs to be deleted before is because seems there are already connections inside it, but the required encryption key used to decrypt connection does not exist. Once the db got reset, encryption key will be re-created, and all things should go well. @IyobedZekarias
from promptflow.
Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!
from promptflow.
I run into exactly the same issue. After deleting the pf.sqlite
file, I can set the correct keys once, but a next action will trigger the following exception
I'm using WSL as well, but not conda
.
File "/home/gijsk/projects/dshub-openai-scripts/.venv/lib/python3.11/site-packages/promptflow/_sdk/entities/_connection.py", line 187, in _from_orm_object_with_secrets
obj = type_cls._from_orm_object_with_secrets(orm_object)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gijsk/projects/dshub-openai-scripts/.venv/lib/python3.11/site-packages/promptflow/_sdk/entities/_connection.py", line 270, in _from_orm_object_with_secrets
obj.secrets = {k: decrypt_secret_value(obj.name, v) for k, v in obj.secrets.items()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gijsk/projects/dshub-openai-scripts/.venv/lib/python3.11/site-packages/promptflow/_sdk/entities/_connection.py", line 270, in <dictcomp>
obj.secrets = {k: decrypt_secret_value(obj.name, v) for k, v in obj.secrets.items()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gijsk/projects/dshub-openai-scripts/.venv/lib/python3.11/site-packages/promptflow/_sdk/_utilities/general_utils.py", line 164, in decrypt_secret_value
raise Exception("Encryption key not found in keyring.")
Exception: Encryption key not found in keyring.
from promptflow.
I figured out a bit more about this issue. The problem is that keyring
doesn't just work on WSL. See the section "Using Keyring on headless Linux systems" on https://pypi.org/project/keyring/. I didn't want to go into this solution involving dbus
, and instead resorted to using a plaintext keyring implementation.
It would be nice if the package would support using a .env
file as is common for other local development.
export PYTHON_KEYRING_BACKEND=keyrings.alt.file.PlaintextKeyring python
from promptflow.
@Gijs-Koot Thanks for your investigation. Promptflow is calling the keyring package during execution but not aware of which kind of keyring backend was using, I'm afraid we don't have a proper time to load the .env, also we need to consider about the prioritization of .env files in different folders. Thanks again for your time.
from promptflow.
Related Issues (20)
- [BUG] Unable to install LangChain > 0.2.0 with PromptFlow runtime HOT 2
- [Feature Request] Run Flow as Function With Variants HOT 2
- [Contribution Request] Correcting some small English grammar mistakes HOT 1
- [Feature Request] Visualizing the evaluations should look different from the promptflow traces, should provide some kind of data visualization HOT 5
- [BUG] [VSCode Extension] Not able to import modules outside of the flow directory HOT 7
- [BUG] KeyError thrown due to environment variables not persisting when calling the promptflow endpoint
- Support remote tracing for CMK-enabled ML workspaces HOT 1
- [BUG]calling pf_client.run inside the callable target function for evaluate got "Error: (AssertionError) daemonic processes are not allowed to have children." HOT 2
- Lisence issue for the dependency on docutils(GPL 3.0) HOT 4
- [BUG] ValueError: Missing required inputs for target : ['question'] while using evalutor_config HOT 3
- [Performance] how to disable all dump, for ex. _node_run_postprocess in run_tracker.py HOT 1
- [BUG] Evaluator respond with Nan values as the first token is a text HOT 1
- [Feature Request] pass addition inputs to target function when using the evaluate method HOT 2
- [Feature Request] Have option to return trace as part of out put of a PromptFlow when deployed as endpoint HOT 11
- [BUG] Running evaluate from promptflow.evals.evaluate and setting trace.destination="none" or "local" causes evaluations to not be available HOT 1
- [BUG] prompt eval method does not take credential and creates PFClient without passing in credential HOT 1
- [BUG] Tracing Contextvar reset HOT 6
- Failed to load trace[BUG] HOT 3
- [BUG] Flow is not enabled HOT 1
- [BUG]evaluator keeps failing with promptflow-eval 0.3.1 but works with 0.3.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promptflow.