jacklul / e621-Batch-Reverse-Search

Perform reverse search for all images in a directory (using e621.net/iqdb_queries, saucenao.com, fuzzysearch.net)
MIT License
57 stars 2 forks source link

error: Authentication required, check configuration! #22

Closed FionaLH4E closed 1 year ago

FionaLH4E commented 1 year ago

I am encountering an issue when running the program and obtaining the following log:

[1/15] Searching '004.jpeg':
Trying md5 sum... no matching posts found!
Trying reverse search #1 (e621.net/iqdb_queries)... error: Authentication required, check configuration!

I have confirmed that my configuration is set up correctly:

DEBUG=true
LOGGING=true
E621_LOGIN='MyUsername'
E621_API_KEY='MyE621ApiKey'
SAUCENAO_API_KEY='MySauceNaoApiKey'

I was wondering if you could assist me in understanding why I am receiving this "Authentication required" error.

FionaLH4E commented 1 year ago

config file is incorrectly linked?

jacklul commented 1 year ago

Try not using single quote symbols, maybe they were parsed as part of the key - see debug log output

FionaLH4E commented 1 year ago

The issue with the missing config file has been resolved by changing the following code: if (isset($options['config'])) { $this->readConfig(realpath($options['config'])); } elseif (file_exists(ROOT . "/config.cfg")) { $this->readConfig(ROOT . "/config.cfg"); }

to

if (isset($options['config'])) { $this->readConfig(realpath($options['config'])); } elseif (file_exists(ROOT . "/src/config.cfg")) { $this->readConfig(ROOT . "/src/config.cfg"); }

This change ensures that the default config file (config.cfg) is located in the /src folder, which is where it is expected to be found.

jacklul commented 1 year ago

You're not supposed to run it from the src/app.php file, you're supposed to use phar from the releases or build it yourself with build.php.

FionaLH4E commented 1 year ago

Got it. Thanks!