GwentCommunityDevelopers / card-images

3 stars 1 forks source link

Error while generating new cards #6

Open kachna96 opened 6 years ago

kachna96 commented 6 years ago

Hi, I'm trying your tool for the first time and unfortunately I can't make it work for some reason. When I send a HTTP Request http://localhost/card-images-master/card_generator.php?cards=112101 I get the following response: [v] JSON parsing done (2.39 sec) [x] Card ID 112101 not found 0 cards generated in 2.39 sec Generation errors : 1 Not-released cards : 0 When I try the same request without a parameter, I get whole bunch of errors and warnings, see https://pastebin.com/UAbFWUJd I'm running on Windows 10 and PHP 7.1.9 I followed the installation guide step by step, so assets/artworks directory contains image files (11210100.png, etc), JSON with correct data (https://raw.githubusercontent.com/kachna96/aretuza/master/www/resources/database.json) is present in the same folder as card_generator.php,I installed Imagick extension and dependencies via Composer so I'm not really sure where I am making the mistake.

Can you please advice me how to proceed next? Thanks!

jamieadkins95 commented 6 years ago

@Meowcate A question for you I think

@kachna96 Sorry, I don't maintain this project, but I have the latest card images from CDPR that I will have uploaded within the next couple of hours, if you can wait that long

kachna96 commented 6 years ago

Yeah, sure I can wait, thanks!

jamieadkins95 commented 6 years ago

@kachna96

The raw images can be found here: https://cdn-l-mkt.cdprojektred.com/archive/cards_swap.zip

If you use our dataset as well, I've updated that for v0.9.24: https://github.com/GwentCommunityDevelopers/gwent-data-release

The images for that are currently uploading. It's a huge upload so it'll take ~2 hours

Meowcate commented 6 years ago

@kachna96 Sorry it tooks so long to give you an answer ! So I'm looking at your message and logs. Apparently the script is reading your JSON but can't get the datas. I can't look at it right know, but try this just to be sure : put your JSON content in an array (add a [ at the beginning and a ] at the end of the file), then see if it works better. Else, I'll try to get it later and patch this.

Anyway, it's a problem with the JSON reader here. If you need only a few cards for the moment, you can also use the "custom cards" generator options by providing the parameters for each card.