Hanson / vbot

微信,企微,机器人,企业微信,企微机器人,微信机器人,小红书,美团,美团爬虫,聚合聊天,RPA,协议,hook,逆向,群发,自动回复,chatgpt,API对接,稳定防封全语言通用,企业定制/SCRM/SAAS专用
MIT License
4.06k stars 711 forks source link

扫码后报错,vbot.ERROR: Type error: Argument 2 #234

Closed vincent-anlan closed 6 years ago

vincent-anlan commented 6 years ago

看了之前也有提出同样问题的,但是可能版本更新了,找不到hotgirl了,请问有没有遇到相同问题的?

`[2017-12-27 22:59:38] vbot.ERROR: Type error: Argument 2 passed to Illuminate\Redis\RedisManager::construct() must be of the type array, null given, called in /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php on line 31 [] [] PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 2 passed to Illuminate\Redis\RedisManager::construct() must be of the type array, null given, called in /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php on line 31 in /root/vbot/vendor/illuminate/redis/RedisManager.php:40 Stack trace:

0 /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php(31): Illuminate\Redis\RedisManager->__construct('predis', NULL)

1 /root/vbot/vendor/illuminate/container/Container.php(749): Hanson\Vbot\Foundation\ServiceProviders\CacheServiceProvider->Hanson\Vbot\Foundation\ServiceProviders{closure}(Object(Hanson\Vbot\Foundation\Vbot), Array)

2 /root/vbot/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build(Object(Closure))

3 /root/vbot/vendor/illuminate/container/Container.php(586): Illuminate\Container\Container->resolve('redis', Array)

4 /root/vbot/vendor/illuminate/container/Container.php(1 in /root/vbot/vendor/illuminate/redis/RedisManager.php on line 40

[2017-12-27 22:59:38] vbot.ERROR: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 2 passed to Illuminate\Redis\RedisManager::construct() must be of the type array, null given, called in /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php on line 31 in /root/vbot/vendor/illuminate/redis/RedisManager.php:40 Stack trace: #0 /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php(31): Illuminate\Redis\RedisManager->construct('predis', NULL) #1 /root/vbot/vendor/illuminate/container/Container.php(749): Hanson\Vbot\Foundation\ServiceProviders\CacheServiceProvider->Hanson\Vbot\Foundation\ServiceProviders{closure}(Object(Hanson\Vbot\Foundation\Vbot), Array) #2 /root/vbot/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build(Object(Closure)) #3 /root/vbot/vendor/illuminate/container/Container.php(586): Illuminate\Container\Container->resolve('redis', Array) #4 /root/vbot/vendor/illuminate/container/Container.php(1 [] [] PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalErrorException: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 2 passed to Illuminate\Redis\RedisManager::__construct() must be of the type array, null given, called in /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php on line 31 in /root/vbot/vendor/illuminate/redis/RedisManager.php:40 Stack trace:

0 /root/vbot/vendor/hanson/vbot/src/Foundation/ServiceProviders/CacheServiceProvider.php(31): Illuminate\Redis\RedisManager->__construct('predis', NULL)

1 /root/vbot/vendor/illuminate/container/Container.php(749): Hanson\Vbot\Foundation\ServiceProviders\CacheServiceProvider->Hanson\Vbot\Foundation\ServiceProviders{closure}(Object(Hanson\Vbot\Foundation\Vbot), Array)

2 /root/vbot/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build(Object(Closure))

3 /root/vbot/vendor/illuminate/container/Container.php(586): Illuminate\Container\Container->resolve('redis', in /root/vbot/vendor/illuminate/redis/RedisManager.php on line 40

`

vincent-anlan commented 6 years ago

找到了解决方法是 下载redis, 然后在run.php里面 option中加入配置

'database' => [ 'redis' => [ 'default' => [ 'host' => 'localhost', 'port' => 6379, 'database' => 1, ], ], ],

@bear-shen