flickr-cli icon indicating copy to clipboard operation
flickr-cli copied to clipboard

does not automatically create config file

Open tacman opened this issue 7 years ago • 8 comments

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]

tacman avatar Feb 18 '18 14:02 tacman

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?

Kyshman avatar Nov 22 '18 17:11 Kyshman

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

TheFox avatar Nov 23 '18 09:11 TheFox

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

Kyshman avatar Nov 27 '18 08:11 Kyshman

@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>

TheFox avatar Dec 09 '18 17:12 TheFox

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.

phirschybar avatar Dec 25 '18 21:12 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 🍻

phirschybar avatar Dec 25 '18 22:12 phirschybar

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.

TheFox avatar Dec 26 '18 09:12 TheFox

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.

Kyshman avatar Dec 28 '18 04:12 Kyshman