AltimateAI / vscode-dbt-power-user

This extension makes vscode seamlessly work with dbt™: Auto-complete, preview, column lineage, AI docs generation, health checks, cost estimation etc
https://www.altimate.ai
MIT License
460 stars 94 forks source link

An error occurred while loading view #1334

Closed 8513421 closed 1 month ago

8513421 commented 3 months ago

Expected behavior

Working extension

Actual behavior

After reinstalling Linux Manjaro, I installed Code and the extension: Power User for dbt core. Unfortunately, it seems that it doesn't detect dbt (it is installed in venv/poetry). In the "query result" tab (after clicking play), I get: An error occurred while loading view: dbtPowerUser.PreviewResults. When selecting "compiled dbt preview," I get: still loading dbt project, please try again later... When selecting "collect diagnostic," I get: Diagnostics started... Diagnostics ended with error... Error=TypeError: Cannot read properties of undefined (reading 'getEnvVars')

Steps To Reproduce

Log output/Screenshots

No response

Operating System

Linux Manjaro

dbt version

1.8.4

dbt Adapter

postgres

dbt Power User version

v0.42.5

Are you willing to submit PR?

kalebkemp commented 2 months ago

I am having the same issue after updating VSCode this morning. Extension was working before the update.

thebroberts commented 2 months ago

this should be fixed now: https://github.com/AltimateAI/vscode-dbt-power-user/commit/7c26b3561fb2affd286aa1b8d3bbd00c34c1226e

1379

8513421 commented 1 month ago

this should be fixed now: 7c26b35 #1379

Still not working on version v0.44.7

anandgupta42 commented 1 month ago

@8513421 What's the version of dbt you are using?

8513421 commented 1 month ago

@8513421 What's the version of dbt you are using?

dbt-core = "^1.8.4" dbt-postgres = "^1.8.2"

mickaelandrieu commented 1 month ago

Same here : extension and vscode up to date, dbt > 1.8 python v12 on Windows 10 pro

An error occurred while loading view: dbtPowerUser.PreviewResults

ishani2412 commented 1 month ago

Same here. Dbt power user is not working in vscode on Mac M3.

keith-fajardo commented 1 month ago

Same here. Lineage is not working when I upgraded dbt to 1.8.6

anandgupta42 commented 1 month ago

Hey @keith-fajardo, @ishani2412, @mickaelandrieu, we haven't been able to identify the root cause of this issue. Since the extension isn't loading, we're unable to generate the diagnostics or logs that typically help us resolve the problems.

anandgupta42 commented 1 month ago

Quick update:

So far. it looks like the problem is restricted to user who are on vscode version < 1.91.0 . We rely on the vscode python extension as a dependency, which now requires vscode version 1.91.0 or newer. We're currently exploring solutions to bypass this requirement, but in the meantime, updating vscode to the latest version should resolve the issue.

mickaelandrieu commented 1 month ago

Hi @anandgupta42, sorry but I don't this you're right? I'm using vs code 1.93 and the VS Code Python extension is installed, enabled and up to date.

Capture Capture

Let me know what I can do to help you ... to help us ^^

anandgupta42 commented 1 month ago

@mickaelandrieu Can you share the dev tools logs with us. Here is you can get it

  1. ctrl + shift + p
  2. developer: toggle developer tools
  3. go to console
  4. Check if you see any errors in there or share the entire log with us here at https://app.myaltimate.com/contactus ?
ishani2412 commented 1 month ago

Yes, this thing helped me in identifying the error. I was on older version and updating to 1.93 helped in running the extension.

On Tue, 10 Sept 2024 at 02:07, anandgupta42 @.***> wrote:

@mickaelandrieu https://github.com/mickaelandrieu Can you share the dev tools logs with us. Here is you can get it

  1. ctrl + shift + p
  2. developer: toggle developer tools
  3. go to console
  4. Check if you see any errors in there or share the entire log with us here at https://app.myaltimate.com/contactus ?

— Reply to this email directly, view it on GitHub https://github.com/AltimateAI/vscode-dbt-power-user/issues/1334#issuecomment-2339304525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKEZJMLI7WDHNRIFZTROG43ZVYS4RAVCNFSM6AAAAABLOEVINSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGMYDINJSGU . You are receiving this because you were mentioned.Message ID: @.***>

mickaelandrieu commented 1 month ago

hi @anandgupta42, thanks for the instructions.

Here are the errors I get from my console log :

error

I have never installed Python using Windows Gallery/Store, I use the msi file from python project website.

Regards

GerritPlehn commented 1 month ago

Hey all. You may want to try and use > Python: Select Interpreter in VSCode to change the interpreter. That helped in my case. Please take note of what the current setting is, it may help in debugging the issue.

mickaelandrieu commented 1 month ago

I love you @GerritPlehn : this is exactly what I needed in order to fix my bug.

Thanks all for your time 👍

mdesmet commented 1 month ago

Indeed errors are caused by setting an invalid Python interpreter. No errors should be logged in this case (this has been resolved in recent releases).

anandgupta42 commented 1 month ago

Thanks @mickaelandrieu for sharing the screenshot. It helped us identify the issue. A fix has been pushed and released.