Skip to content

does not automatically create config file #39

Open

Description

@tacman

Following the instructions, after composer install the auth command fails, because there's no config path. Adding the config path fails because there's no config fille.

Could you add a config.yml.dist file to the repo?

I see there's a isConfigRequired property, so maybe this is already handled, but the documentation is perhaps missing something? Or maybe running auth the first time needs to set the isConfigRequired to false?

tac@tac-xps13:/var/www/flickr-cli$ bin/flickr-cli auth --verbose

                              
  [RuntimeException]          
  No config file path found.  
                              

Exception trace:
 () at /var/www/flickr-cli/src/TheFox/FlickrCli/Command/FlickrCliCommand.php:241
 TheFox\FlickrCli\Command\FlickrCliCommand->setupConfig() at /var/www/flickr-cli/src/TheFox/FlickrCli/Command/FlickrCliCommand.php:192
 TheFox\FlickrCli\Command\FlickrCliCommand->setup() at /var/www/flickr-cli/src/TheFox/FlickrCli/Command/AuthCommand.php:61
 TheFox\FlickrCli\Command\AuthCommand->setup() at /var/www/flickr-cli/src/TheFox/FlickrCli/Command/AuthCommand.php:79
 TheFox\FlickrCli\Command\AuthCommand->execute() at /var/www/flickr-cli/vendor/symfony/console/Command/Command.php:240
 Symfony\Component\Console\Command\Command->run() at /var/www/flickr-cli/vendor/symfony/console/Application.php:858
 Symfony\Component\Console\Application->doRunCommand() at /var/www/flickr-cli/vendor/symfony/console/Application.php:216
 Symfony\Component\Console\Application->doRun() at /var/www/flickr-cli/vendor/symfony/console/Application.php:122
 Symfony\Component\Console\Application->run() at /var/www/flickr-cli/bin/flickr-cli:40

auth [-c|--config [CONFIG]] [-f|--force]

Activity

  1. self-assigned this
    on Feb 19, 2018
  2. added this to the v2.1 milestone on Feb 19, 2018
  3. Kyshman commented on Nov 22, 2018

    @Kyshman

    Still unable to proceed beyond the auth step due to missiong config

    ./bin/flickr-cli auth --verbose

    [RuntimeException]
    No config file path found.

    Exception trace:
    () at /home/vagrant/flickr-cli/src/TheFox/FlickrCli/Command/FlickrCliCommand.php:241
    TheFox\FlickrCli\Command\FlickrCliCommand->setupConfig() at /home/vagrant/flickr-cli/src/TheFox/FlickrCli/Command/FlickrCliCommand.php:192
    TheFox\FlickrCli\Command\FlickrCliCommand->setup() at /home/vagrant/flickr-cli/src/TheFox/FlickrCli/Command/AuthCommand.php:61
    TheFox\FlickrCli\Command\AuthCommand->setup() at /home/vagrant/flickr-cli/src/TheFox/FlickrCli/Command/AuthCommand.php:79
    TheFox\FlickrCli\Command\AuthCommand->execute() at /home/vagrant/flickr-cli/vendor/symfony/console/Command/Command.php:240
    Symfony\Component\Console\Command\Command->run() at /home/vagrant/flickr-cli/vendor/symfony/console/Application.php:858
    Symfony\Component\Console\Application->doRunCommand() at /home/vagrant/flickr-cli/vendor/symfony/console/Application.php:216
    Symfony\Component\Console\Application->doRun() at /home/vagrant/flickr-cli/vendor/symfony/console/Application.php:122
    Symfony\Component\Console\Application->run() at /home/vagrant/flickr-cli/bin/flickr-cli:40

    auth [-c|--config [CONFIG]] [-f|--force]

    Any pointers on how to resolve?

  4. TheFox commented on Nov 23, 2018

    @TheFox
    Owner

    This will be released in version 2.1. In the meanwhile you can use develop branch, but I wouldn't.

  5. Kyshman commented on Nov 27, 2018

    @Kyshman

    Oh! I will wait for version 2.1. In the meantime can you help with a sample config.yml for manual editing?

  6. TheFox commented on Dec 9, 2018

    @TheFox
    Owner

    @Kyshman Manual editing is not good. Flickr-cli needs to communicate to Flickr to get the token and token_secret.

    Here is an example:

    flickr:
        consumer_key: <consumer_key>
        consumer_secret: <consumer_secret>
        token: <token>
        token_secret: <token_secret>
  7. phirschybar commented on Dec 25, 2018

    @phirschybar

    I am confused by this as well.

    ~  ./bin/flickr-cli auth --verbose
    
    
      [RuntimeException]
      No config file path found.
    
    
    Exception trace:
     () at /root/flickr-cli/src/TheFox/FlickrCli/Command/FlickrCliCommand.php:241
     TheFox\FlickrCli\Command\FlickrCliCommand->setupConfig() at /root/flickr-cli/src/TheFox/FlickrCli/Command/FlickrCliCommand.php:192
     TheFox\FlickrCli\Command\FlickrCliCommand->setup() at /root/flickr-cli/src/TheFox/FlickrCli/Command/AuthCommand.php:61
     TheFox\FlickrCli\Command\AuthCommand->setup() at /root/flickr-cli/src/TheFox/FlickrCli/Command/AuthCommand.php:79
     TheFox\FlickrCli\Command\AuthCommand->execute() at /root/flickr-cli/vendor/symfony/console/Command/Command.php:240
     Symfony\Component\Console\Command\Command->run() at /root/flickr-cli/vendor/symfony/console/Application.php:858
     Symfony\Component\Console\Application->doRunCommand() at /root/flickr-cli/vendor/symfony/console/Application.php:216
     Symfony\Component\Console\Application->doRun() at /root/flickr-cli/vendor/symfony/console/Application.php:122
     Symfony\Component\Console\Application->run() at /root/flickr-cli/bin/flickr-cli:40
    

    It is unclear how to proceed at this point.

  8. phirschybar commented on Dec 25, 2018

    @phirschybar

    I got this to work. I made a file in a new directory data/config.yml with the following contents:

    flickr:
        consumer_key: <consumer_key>
        consumer_secret: <consumer_secret>
        token: 
        token_secret: 
    

    then ./bin/flickr-cli auth --config=data/config.yml

    then every command being run, like
    ./bin/flickr-cli --config=data/config.yml upload [DIRECTORY]
    should include that --config=data/config.yml option.

    This is a very cool library @TheFox ! I would love to contribute if you are accepting. I just got back into Flickr after many years off it... pretty much after they got acquired by yahoo... but am excited to see what SmugMug will do with it. cheers 🍻

  9. TheFox commented on Dec 26, 2018

    @TheFox
    Owner

    This is a very cool library

    Thank you very much. :)

    I would love to contribute if you are accepting

    Sure, of course you can contribute if you like.

    If you are inside Docker you always have to use the full path. Otherwise the current directory will be used to create the config.yml file.

  10. Kyshman commented on Dec 28, 2018

    @Kyshman

    I got this to work. I made a file in a new directory data/config.yml with the following contents:
    @phirschybar Used the same process and now able to proceed without no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions