mtgjson / mtgjson3

MTGJSON repository for Magic Cards
http://mtgjson.com
Other
548 stars 102 forks source link

Problem with mhash #28

Closed gusadelic closed 9 years ago

gusadelic commented 9 years ago

I'm trying to get the mtgjson application to work and for some reason it's throwing an error.

root@farragut:/var/www/isleofgames/mtgjson/mtgjson# node build/buildSet.js allsets

Doing sets: 10E,2ED,3ED,4ED,5DN,5ED,6ED,7ED,8ED,9ED,ALA,ALL,APC,ARB,ARC,ARN,ATQ,AVR,BNG,BOK,BRB,BTD,C13,C14,CHK,CHR,CM1,CMD,CNS,CON,CSP,DD2,DDC,DDD,DDE,DDF,DDG,DDH,DDI,DDJ,DDK,DDL,DDM,DDN,DGM,DIS,DKA,DRB,DRK,DST,EVE,EVG,EXO,FEM,FUT,GPT,GTC,H09,HML,HOP,ICE,INV,ISD,JOU,JUD,KTK,LEA,LEB,LEG,LGN,LRW,M10,M11,M12,M13,M14,M15,MBS,MD1,ME2,ME3,ME4,MED,MIR,MMA,MMQ,MOR,MRD,NMS,NPH,ODY,ONS,PC2,PCY,PD2,PD3,PLC,PLS,PO2,POR,PTK,RAV,ROE,RTR,S00,S99,SCG,SHM,SOK,SOM,STH,THS,TMP,TOR,TSB,TSP,UDS,UGL,ULG,UNH,USG,V09,V10,V11,V12,V13,V14,VAN,VIS,VMA,WTH,WWK,ZEN

Ripping Set: Tenth Edition Getting card list... Error ripping: Tenth Edition TypeError: undefined is not a function at Object.generateCacheFilePath (/var/www/isleofgames/mtgjson/mtgjson/shared/shared.js:357:16) at getURLAsDoc (/var/www/isleofgames/mtgjson/mtgjson/build/rip.js:466:25) at Function.getListHTML (/var/www/isleofgames/mtgjson/mtgjson/build/rip.js:46:4) at next (/var/www/isleofgames/mtgjson/mtgjson/node_modules/tiptoe/index.js:48:22) at tiptoe (/var/www/isleofgames/mtgjson/mtgjson/node_modules/tiptoe/index.js:111:2) at Object.ripSet (/var/www/isleofgames/mtgjson/mtgjson/build/rip.js:24:2) at Function.build (/var/www/isleofgames/mtgjson/mtgjson/build/buildSet.js:36:8) at next (/var/www/isleofgames/mtgjson/mtgjson/node_modules/tiptoe/index.js:48:22) at tiptoe (/var/www/isleofgames/mtgjson/mtgjson/node_modules/tiptoe/index.js:111:2) at CBRunner.fun (/var/www/isleofgames/mtgjson/mtgjson/build/buildSet.js:33:2)

Line 357 in shared.js is: var urlHash = hash("whirlpool", targetUrl);

I've confirmed that targetUrl is a valid string, so there seems to be something about the hash function that is throwing the error. I even tried to bring down your mhash project code and rebuild it but it had no effect. What am I doing wrong?

Sembiance commented 9 years ago

Whoops. Sorry about that. I've updated the code. I had updated mhash which broke backwards compatibility but hadn't yet updated my code here. Fixed. Make sure you have the latest mhash installed after updating the mtgjson code. Thanks for the bug report!