looker-open-source/gzr

In windows enterprise, how to resolve `expand_path': non-absolute home (ArgumentError)

Closed this issue · 3 comments

Initially below code worked without error and I could even import a look between instances.

After restarting the system, it is throwing below error:
I created .netrc file with appropriate credentials. I made sure I changed .txt to .netrc. (Since this is a windows system)

C:\WINDOWS\system32>chmod 600 c:/users/username/.netrc
C:\WINDOWS\system32>gzr user me --host xxxxxx.looker.com
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/looker-sdk-0.1.6/lib/looker-sdk/authentication.rb:114:in `expand_path': non-absolute home (ArgumentError)

  info = Netrc.read File.expand_path(netrc_file)
                                     ^^^^^^^^^^
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/looker-sdk-0.1.6/lib/looker-sdk/authentication.rb:114:in `load_credentials_from_netrc'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/looker-sdk-0.1.6/lib/looker-sdk/client.rb:60:in `initialize'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gazer-0.3.10/lib/gzr/modules/session.rb:220:in `new'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gazer-0.3.10/lib/gzr/modules/session.rb:220:in `login'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gazer-0.3.10/lib/gzr/modules/session.rb:305:in `with_session'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gazer-0.3.10/lib/gzr/commands/user/me.rb:41:in `execute'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gazer-0.3.10/lib/gzr/commands/user.rb:98:in `me'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
    from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gazer-0.3.10/exe/gzr:36:in `<top (required)>'
    from C:/Ruby32-x64/bin/gzr:32:in `load'
    from C:/Ruby32-x64/bin/gzr:32:in `<main>'

I even tried icacls commands but that did not work

Gazer is not tested or supported on Windows.

Can you run Gazer from the linux subsystem?

Thank you for your response.
I started running gazer from Linux Subsytem using Ubuntu. It worked!