ticker icon indicating copy to clipboard operation
ticker copied to clipboard

invalid config - permission denied

Open webgtx opened this issue 1 year ago • 8 comments

Describe the bug Configuration from the readme does not work with the ticker.

To Reproduce Steps to reproduce the behavior:

  1. Build ticker
  2. Copy config from the readme to ~/.ticker.yaml
  3. Run ticker --config ~/.ticker.yaml
  4. See following error invalid config: yaml: line 2: mapping values are not allowed in this context

Expected behavior Anything but error

Environment (please complete the following information):

  • OS: Fedora release 40 (Forty)
  • Terminal: foot version: 1.17.2 -pgo +ime +graphemes -assertions
  • ticker Version: ticker version v0.0.0 (I built it on latest git commit)

Configuration that I'm using The place where I get it from: https://github.com/achannarasappa/ticker#configuration

i# ~/.ticker.yaml
show-summary: true
show-tags: true
show-fundamentals: true
show-separator: true
show-holdings: true
interval: 5
currency: USD
currency-summary-only: false
watchlist:
  - NET
  - TEAM
  - ESTC
  - BTC-USD # Bitcoin price via Yahoo
  - SOL.X # Solana price via CoinGecko
  - SAMOYEDCOIN.CG # Samoyed price via CoinGecko
  - CARDANO.CC # Samoyed price via CoinCap
lots:
  - symbol: "ABNB"
    quantity: 35.0
    unit_cost: 146.00
  - symbol: "ARKW"
    quantity: 20.0
    unit_cost: 152.25
  - symbol: "ARKW"
    quantity: 20.0
    unit_cost: 145.35
    fixed_cost: 7.00 # e.g. brokerage commission fee
groups:
  - name: crypto
    watchlist:
      - SHIB-USD
      - VGX-USD
    holdings:
      - symbol: SOL1-USD
        quantity: 17
        unit_cost: 159.10

webgtx avatar Jun 28 '24 08:06 webgtx

The configuration I used had a typo. Please ignore this issue, thank you.

webgtx avatar Jun 28 '24 08:06 webgtx

I'm getting invalid config - permission denied for the same (no typo) yaml file, and for which I gave all permissions:

jr@jr-Legion-7-16IAX7:~$ ticker --config ~/.ticker.yaml
Error: invalid config: open /home/jr/.ticker.yaml: permission denied
jr@jr-Legion-7-16IAX7:~$ ls -l .ticker.yaml 
-rwxrwxrwx 1 jr jr 776 Nov 12 12:10 .ticker.yaml

jeremy-rutman avatar Nov 12 '24 18:11 jeremy-rutman

Same issue as above

xrewati avatar Dec 05 '24 07:12 xrewati

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jul 06 '25 02:07 github-actions[bot]

If someone runs into this issue in the future, the fix for me (ubuntu 24.04, ticker version 5.0.5 installed from apt) was to remove the period in front of the ticker.yaml config file making it not hidden.

Not sure if this is addressed elsewhere, but there you go.

qedisme avatar Jul 22 '25 05:07 qedisme

Looks like this was reported twice before, but the bug has returned?

https://github.com/achannarasappa/ticker/issues/136 https://github.com/achannarasappa/ticker/issues/159

As noted above, I've installed latest, 5.0.5 from Ubuntu's apt repo.

My .ticker.yaml file was restored from backup, meaning it was working with the hidden yaml file.

qedisme avatar Jul 22 '25 06:07 qedisme

With snap install : ticker --config=/home/user/ticker.yaml <- works ticker --config=/home/user/.ticker.yaml <- fails with "invalid config: open /home/user/.ticker.yaml: permission denied"

deepcoder avatar Oct 01 '25 05:10 deepcoder

This is due to Snap confinement blocking access to dotfiles. I've pushed an update that should make this work with an extra step at installation but the change requires manual review which is pending.

achannarasappa avatar Oct 06 '25 02:10 achannarasappa