3

I have created a charm by following the details here @ https://jujucharms.com/docs/stable/tools-charm-tools

I created one charm called "foo"

$ charm create foo
INFO: Using default charm template (reactive-python). To select a different template, use the -t option.
INFO: Generating charm for foo in ./foo
INFO: No foo in apt cache; creating an empty charm instead.
Cloning into '/tmp/tmpytr_hB'...
remote: Counting objects: 27, done.
remote: Total 27 (delta 0), reused 0 (delta 0), pack-reused 27
Unpacking objects: 100% (27/27), done.
Checking connectivity... done.

Which is empty and has nothing. that is ok. Now when I try to list this charm using charm list, it gives me below ERROR

$ charm list
ERROR cannot create the charm store client: cannot load the cookie jar

The same error I am getting for few other charm options. Can someone help me here?

UserASR
  • 2,015
  • 4
  • 24
  • 47
  • 1
    Hi, tried to respond to your comment on your AskUbuntu question, but it was deleted as I did so. Glad you figured out the solution. – Arronical Jan 23 '17 at 10:19
  • @Arronical, Thanks for your time, the problem is that the error message is not quite helpful there. – UserASR Jan 23 '17 at 10:22
  • FYI: I filed a bug to display a better error message: https://github.com/juju/charmstore-client/issues/109 – jrwren Jan 26 '17 at 15:52
  • @jrwren thanks. That will be really helpful for the others. – UserASR Jan 27 '17 at 15:27

2 Answers2

1

This was happening because my user does not have the root access.

Without sudo:

$ charm list
ERROR cannot create the charm store client: cannot load the cookie jar

With sudo:

$ sudo charm list
No charms found.

All other charm options are also accessible.

UserASR
  • 2,015
  • 4
  • 24
  • 47
1

This is because of a permissions issue in your home directory. You should never need to use sudo with juju, charm, or any charm-tools command. Please try to first run chown -R $USER.$USER $HOME/.local/share/juju then try again.

Marco Ceppi
  • 7,163
  • 5
  • 31
  • 43
  • 2
    Probably you forgot to tell me to do the same with `$HOME/.go-cookies`. Now i don't have to use `sudo` anymore. Thanks! – UserASR Jan 24 '17 at 05:39