Hi all, After taking a break to focus on other th...
# troubleshooting
e
Hi all, After taking a break to focus on other things, I came back to my old meltano project.. wanting to upgrade I attempted to do this
Copy code
pip install meltano
meltano install
meltano upgrade

  ...
   Updating files managed by plugins...
   Updating file bundle 'airflow'...
   Updating file bundle 'dbt'...
   [Errno 2] No such file or directory: '/home/emcp/Dev/git/my_project_root/.meltano/files/airflow/venv/bin/python'
but it might be that I need to refactor something or ? I thought I had airflow under the hood but is the proper thing to simply elect to install it again ?
Copy code
$ meltano add orchestrator airflow
Orchestrator 'airflow' variant 'original' is not known to Meltano. Variants: ['apache (default)']
Doc source : https://docs.meltano.com/getting-started#schedule-pipelines-to-run-regularly
extract from my projects
meltano.yml
Copy code
orchestrators:
  - name: airflow
    pip_url: apache-airflow==2.1.0 --constraint <https://raw.githubusercontent.com/apache/airflow/constraints-2.1.0/constraints-3.7.txt>
perhaps cleanest thing is to just start with a fresh project and diff the two?
i'll keep googling if there's like a "Upgrade from 1.x to 2.x release notes"
https://docs.meltano.com/guide/v2-migration ah hah! okay I am cracking this open then....
hmmmm , I seem to be stuck due to permissions? this is all occurring in a venv already so.. unsure what more I need to do
Copy code
$ meltano add transformer dbt-postgres
Added transformer 'dbt-postgres' to your Meltano project
Variant:        dbt-labs (default)
Repository:     <https://github.com/dbt-labs/dbt-core>
Documentation:  <https://docs.meltano.com/guide/transformation>

Adding required file bundle 'files-dbt-postgres' to your Meltano project...
Variant:        meltano (default)
Repository:     <https://github.com/meltano/files-dbt-postgres>
Documentation:  <https://hub.meltano.com/files/files-dbt-postgres>

Installing transformer 'dbt-postgres'...
Installing file bundle 'files-dbt-postgres'...
Transformer 'dbt-postgres' could not be installed: could not create the virtualenv for 'transformers/dbt-postgres'

File bundle 'files-dbt-postgres' could not be installed: could not create the virtualenv for 'files/files-dbt-postgres'

Installed 0/2 plugins
Failed to install plugin(s)
v
'/home/emcp/Dev/git/my_project_root/.meltano/files/airflow/venv/bin/python'
If you look at that file it probably points to a different python than you have now. Easiest fix is
meltano install
or
meltano install --clean
e
I realize this whole setup came from my prior OS.. so indeed I may need to just.. reclone from git and start from scratch Derek, thanks for the sanity check
I thought a
chown -R ....
would sort it but, apparently not
v
probably don't need a reclone, but atleast a
meltano install --force
Or sometimes when I don't want to even second guess it I just
rm -rf .meltano
then reinstall
e
funny I just did the latter ... didn't work.. moved the folder, cloned from git ... same error as when I wiped out .meltano
Copy code
$ meltano install
Installing 8 plugins...
Installing extractor 'tap-ibkr-tickers'...
Skipped installing extractor 'tap-ibkr-tickers'...
Installing extractor 'tap-ibkr-news'...
Skipped installing extractor 'tap-ibkr-news'...
Installing loader 'target-postgres'...
Installing loader 'target-jsonl-blob'...
Skipped installing loader 'target-jsonl-blob'...
Installing orchestrator 'airflow'...
Installing transformer 'dbt'...
Installing file bundle 'airflow'...
Installing file bundle 'dbt'...
Transformer 'dbt' could not be installed: could not create the virtualenv for 'transformers/dbt'

Orchestrator 'airflow' could not be installed: could not create the virtualenv for 'orchestrators/airflow'

File bundle 'dbt' could not be installed: could not create the virtualenv for 'files/dbt'

File bundle 'airflow' could not be installed: could not create the virtualenv for 'files/airflow'

Loader 'target-postgres' could not be installed: could not create the virtualenv for 'loaders/target-postgres'

Installed 0/8 plugins
Skipped installing 3/8 plugins
Failed to install plugin(s)
is my python too new, let me go check .. I am on 3.10
v
do --clean
e
same output , trying
--force
now
v
I'd run with debug on something's happening, could be 3.10 dpeends on you targets/taps etc
e
--force
is no such option
ahh good point on it being the taps/targets perhaps
my guess is.. DBT is out.. now there are dbt variants so that is failing for that reason.. airflow likely a similar story how'd you turn on debug? I did
meltano install --debug --verbose
but both those options are not valid
feels cleaner if I just start a blank project and reinstall piece-wise
I gotta say, looking over the documentation site.. it feels there is this missing gap between installation.. and getting a project started.. almost all I can find is guides for once you're up and running with all the plugins you want installed.. I will need to re-google to find the "my first tap-target" flows I used in the past
Citation : https://docs.meltano.com/guide/installation - I get to install and then... that's it.. would be good to nudge me next to getting things going further.. maybe I am blind here. a separate page works to start me off : https://meltano.com/documentation/getting-started/ ah and also seeing https://docs.meltano.com/getting-started#create-your-meltano-project
so I took a chance with a blank project .. and getting similar errors
Copy code
(settings) [[]]: key:value
'value' is not a valid SettingKind
(settings) [[]]: key:string
Added extractor 'tap-ibkr' to your Meltano project

Installing extractor 'tap-ibkr'...
Extractor 'tap-ibkr' could not be installed: could not create the virtualenv for 'extractors/tap-ibkr'

Failed to install plugin(s)
I am going to take a guess that perhaps pipx went from a suggestion to a requirement?
im gonna google the troubleshooting page
I guess I had this problem a while back https://github.com/meltano/meltano/issues/2862 my prior workaround was to use venvs... but now that doesn't even work
I guess I have to give up and use pipx (or at least try that and report back)
ahhhh , I think I have found the problem
Copy code
python3 -m venv .venv
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.10-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.
need to update my docs with this
i was using venvs built via pycharm and .. hence not seeing the core error
# okay, python virtualenv installed but now when I
meltano install
it hangs on the post
Installed transfer dbt
.. I am going to wipe everything and attempt to upgrade first, THEN install
dang no luck (I upgraded and that went okay, but it still hangs on install in the same place).. okay this is a DBT thing based on the migration docs that I need to solve ..
a
Hey ๐Ÿ‘‹ There is no dbt anymore Use dbt-<adapter> That looks like the problem since way up in the thread ๐Ÿงต
I think it was compounded I should say by the venv thing Hope it helps!
e
good shout Alex, thank you.. yes I started finding my way with the migration docs im will assume this error on removal of old DBT is just a warning that there was nothing to remove and proceed from there
Copy code
$ meltano remove transformer dbt

Removing transformer 'dbt'...

Error removing plugin transformer 'dbt' from system database: None
Removed transformer 'dbt' from meltano.yml
Could not find transformer 'dbt' in .meltano/transformers to remove
Removed transformer 'dbt' from plugins/transformers/dbt*.lock
well... despite all the
meltano upgrade files
and
meltano upgrade
.. and
meltano remove transformer dbt
after getting the new postgres specific variant... I still hang on the very end of
meltano install
... I'll let it run but.. i would guess somethings a bit off with my migration and it might be best to just.. re-install a project from scratch
a
What happens when you do meltano discover transformers
Is dbt-postgres even on there ๐Ÿค”
e
it lists the available transformers correctly
yes, I had added it
one line I see in the migration.. Removing a file bundle does not remove any files from your
transform/
directory. Manually remove
transform/profiles.yml
is that path correct? I do not have
transform/profiles.yml
.. but i DO have
transform/profile/profiles.yml
a
Gotcha. So can you do meltano install transformer dbt-postgres So only a single thing is installing and it is for sure isolated
e
that works
Copy code
$ rm -rf .meltano/
$ meltano install transformer dbt-postgres
Installing 1 plugins...
Installing transformer 'dbt-postgres'...
Installed transformer 'dbt-postgres'
a
Ok I would install everything one at a time to find your real problem if it resurfaces
e
perhaps you're right.. in that case though maybe I just start with the blank new project and once finished (if it finishes) diff my two projects at the end
I am sure it's just some legacy stuff, or maybe my custom tap
thanks Alex
I've filed a issue on the github, I think the issue is actually of all things airflow ( well .. not airflow but airflow+py3.10) https://github.com/meltano/meltano/issues/6536
okay I went back to my OG project.. modified the path to apache airflow and... we're installed!
Copy code
$ meltano install
Installing 7 plugins...
Installing extractor 'tap-ibkr-tickers'...
Skipped installing extractor 'tap-ibkr-tickers'...
Installing extractor 'tap-ibkr-news'...
Skipped installing extractor 'tap-ibkr-news'...
Installing loader 'target-postgres'...
Installing loader 'target-jsonl-blob'...
Skipped installing loader 'target-jsonl-blob'...
Installing orchestrator 'airflow'...
Installing transformer 'dbt-postgres'...
Installing file bundle 'airflow'...
Installed file bundle 'airflow'
Run `meltano upgrade files` to update your project's 'airflow' files.
Installed loader 'target-postgres'
Installed transformer 'dbt-postgres'
Installed orchestrator 'airflow'
Installed 4/7 plugins
Skipped installing 3/7 plugins
Thank you @visch and @alexander_butler again
v
Glad you got it, I had to bounce! Thanks @alexander_butler
I should have said more explicitly I was trying to fix one issue, not the whole thing ha. I'll put that in my head for next time!