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

Does not work without OPENAPI_KEY in environment #4

Closed
2 tasks done
munish7771 opened this issue May 29, 2023 · 1 comment
Closed
2 tasks done

Does not work without OPENAPI_KEY in environment #4

munish7771 opened this issue May 29, 2023 · 1 comment

Comments

@munish7771
Copy link
Contributor

munish7771 commented May 29, 2023

Installation -

pip3 install dbt-doc-py

DBT environment -

link to repo

Error log-

`dbt-doc-py
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
Running DBT docs generate...
DBT docs successfully generated!
You haven't specified an API Key. No worries, this one's on TextQL!
In return, please type your email address. We don't collect any other data, nor sell your email to third parties.
If you're okay with this, press enter. Otherwise, type 'no' and set the OPENAI_API_KEY environment variable.
Email (type no to abort): [email protected]
[?] Select the models you want to document: (Press Spacebar to select, Enter to confirm) :

[X] model.magicschool.my_third_dbt_model
[ ] model.magicschool.my_second_dbt_model
[ ] seed.magicschool.customers
[ ] model.magicschool.my_first_dbt_model

Generating docs for: my_third_dbt_model
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
'UserInfo' object has no attribute 'key'
OAI request to my_third_dbt_model failed: 'UserInfo' object has no attribute 'key'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/dbt-doc-py", line 33, in
sys.exit(load_entry_point('dbt-doc-py==0.1.19', 'console_scripts', 'dbt-doc-py')())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 864, in run_async_main
asyncio.run(async_main(sys.argv[1:]))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 858, in async_main
await main(argv)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 841, in main
summarized_nodes = await asyncio.gather(*[open_ai_summarize(env, r_deps, pair[1]) for pair in nodes_to_process])
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 322, in open_ai_summarize
raise e # Reraise the exception to trigger a retry
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 304, in open_ai_summarize
tbl_result, col_result = await asyncio.gather(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 279, in run_openai_request
raise e
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt_doc_py/dbt_doc_py.py", line 257, in run_openai_request
if env.api_key.key:
AttributeError: 'UserInfo' object has no attribute 'key'`

Troubleshooting -

  • Runs successfully if you add your own OPENAI_API_KEY in environment.
  • Tried running with local installation of dbt, rather than docker. Same issue persists.
@TenKenZero
Copy link
Contributor

A new version was released, fixing this error.

https://pypi.org/project/dbt-doc-py/0.1.25/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants