Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zkillboard import #23

Closed
retsuc opened this issue Jun 21, 2017 · 7 comments
Closed

Zkillboard import #23

retsuc opened this issue Jun 21, 2017 · 7 comments

Comments

@retsuc
Copy link

retsuc commented Jun 21, 2017

Whenever I do a /import/zkillboard the log kicks out

[2017-06-21 07:57:49] production.ERROR: exception 'Exception' with message 'Unable to parse response as JSON' in C:\eve-traders-handbook\vendor\nategood\httpful\src\Httpful\Handlers\JsonHandler.php:29
Stack trace:
#0 C:\eve-traders-handbook\vendor\nategood\httpful\src\Httpful\Response.php(106): Httpful\Handlers\JsonHandler->parse('\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x03$\x8BA\x0E\xC2...')
#1 C:\eve-traders-handbook\vendor\nategood\httpful\src\Httpful\Response.php(45): Httpful\Response->_parse('\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x03$\x8BA\x0E\xC2...')
#2 C:\eve-traders-handbook\vendor\nategood\httpful\src\Httpful\Request.php(229): Httpful\Response->__construct('\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x03$\x8BA\x0E\xC2...', 'HTTP/1.1 200 OK...', Object(Httpful\Request), Array)
#3 C:\eve-traders-handbook\app\controllers\ImportController.php(73): Httpful\Request->send()
#4 C:\eve-traders-handbook\app\controllers\ImportController.php(53): ImportController->getZkillboard('30001153,300011...')
#5 [internal function]: ImportController->getZkillboard()
#6 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(231): call_user_func_array(Array, Array)
#7 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('getZkillboard', Array)
#8 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(ImportController), Object(Illuminate\Routing\Route), 'getZkillboard')
#9 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\Router.php(962): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'ImportControlle...', 'getZkillboard')
#10 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}()
#11 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\Route.php(109): call_user_func_array(Object(Closure), Array)
#12 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#13 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Routing\Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#14 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#15 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#16 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Session\Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#17 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Cookie\Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#18 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Cookie\Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#19 C:\eve-traders-handbook\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#20 C:\eve-traders-handbook\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#21 c:\eve-traders-handbook\public\index.php(49): Illuminate\Foundation\Application->run()
#22 {main} [] []

@matthewpennell
Copy link
Owner

It's not getting the correct format of response back from zKillboard. Have you gone through the steps to enter your alliance, home region, and the regions where you want to collect kills?

@retsuc
Copy link
Author

retsuc commented Jun 21, 2017

Yes, I've entered all that information. I tried again this morning, i got the "Whoops" message again, but when i reloaded ETH main page all the info was there despite that. It didn't do that last night

@retsuc
Copy link
Author

retsuc commented Jun 21, 2017

Its just acting odd. Sometimes it will work, most times it won't. Same with import/clear. Sometimes it gives the whoops and clears, sometimes I get a 404 error.

edit: I found the clear problem. the link points to http://localhost/import/clear instead of http://localhost/eve-traders-handbook/import/clear

edit2: The import issue seems to be if you have more than one alliance selected. I was hoping to pull data from a couple of them. Additionally, it will import and give the Whoops message, but when you reload the main page the data is there. Everytime I add a second alliance, it won't import.

@ghost
Copy link

ghost commented Jun 21, 2017

I'm not sure if the zKill API supports multiple alliances. You can check by adding a line to app/controllers/ImportController.php around line 68:

die($url);

That will spit out the zkillboard call it is making. Try visiting that URL; if you get an API error, it's because zKill doesn't allow multiple alliances to be submitted.

Let me know and I'll fix it to not permit selecting more than one alliance.

@matthewpennell
Copy link
Owner

Pushed 7e7a8ba which fixes the bug you were encountering.

Repository owner deleted a comment Jun 21, 2017
@retsuc
Copy link
Author

retsuc commented Jun 21, 2017

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants