shogerr / bluprntr

Prints your Bluprints to disk
11 stars 2 forks source link

SyntaxError: Unexpected end of JSON input #11

Closed BobbieVx closed 4 years ago

BobbieVx commented 4 years ago

Was working great a week or two ago. Downloaded about 30 keep forever classes. Saved me a ton of time doing it manually with youtube-dl so thank you so much for making this. However, when I try to start bluprntr today I get an error. Not sure what I'm doing wrong. Tried uninstalling everything and reinstalling and still get the same syntax error.

undefined:1 SyntaxError: Unexpected end of JSON input at JSON.parse () at Object. (/Users/robert/Downloads/bluprntr-master/src/index.js:60:53) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) at Module.load (internal/modules/cjs/loader.js:1049:32) at Function.Module._load (internal/modules/cjs/loader.js:937:14) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at Object. (/Users/robert/Downloads/bluprntr-master/src/server.js:4:1) at Module._compile (internal/modules/cjs/loader.js:1200:30)

shogerr commented 4 years ago

Hey, thanks for creating the issue.

This error may be from the collection.json being malformed in some way. I will push an update that handles these types of errors a little better, but in the meantime you may be able to get things running by:

  1. Making a copy of collection.json and saving it;
  2. deleting the original collection.json.

The application should create a new file. Only the data.json is used to check if a download has already occurred. I will probably simplify this a bit.

shogerr commented 4 years ago

In the latest version I've increased verbosity on logging and made using the collection file optional. Please download the new version and see if it doesn't work a little bit better.

BobbieVx commented 4 years ago

Thank you! I renamed my Bluprint folder and ran it again and it created a new folder and launches perfectly. You are so awesome for making this!