question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There's a Exception to load json file, I provide the json

See original GitHub issue

I don’t know if the something wrong with json, but it was exported by AE. Please spend some time, Thanks very much!

I found something wrong in codes. If json contains “.png”, must provide the images folder. I use AI and then Export into AE, it has no png images! @seanfchan

failed_anim.json.zip

java.lang.IllegalStateException: 
You must set an images folder before loading an image. Set it with LottieComposition#setImagesFolder or LottieDrawable#setImagesFolder                                                           
at com.airbnb.lottie.ImageAssetBitmapManager.bitmapForId(ImageAssetBitmapManager.java:70)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
gpealcommented, Mar 30, 2017

@SwayChen When you import an Illustrator layer, convert your AI layer to a shape layer or else bodymovin will export it as a png. https://helpx.adobe.com/after-effects/atv/cs6-tutorials/converting-imported-vector-graphics-from-illustrator-to-shape-la.html

2reactions
seanfchancommented, Mar 30, 2017

@SwayChen not exactly sure what the problem is, but here a few thing to try.

  1. Some data json generated by bodymovin is also accompanied by an image, did you try putting the image in the asset folder as well?
  2. You can try calling LottieAnimationView#setImageAssetsFolder to set which folder Lottie should try to search for assets

@gpeal any other thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

When I load my json file i get this error: Exception has occurred
1 Answer 1 ... Your JSON file is malformed, JSON object must have only one top level, try this example. ... You got...
Read more >
Python JSON: Encode(dumps), Decode(loads) & Read JSON ...
JSON in Python is a standard format inspired by JavaScript for data exchange and data transfer as text format over a network.
Read more >
Python Tutorial: json.dump(s) & json.load(s) - 2021
There are two ways of reading in (load/loads) the following json file, in.json: {"alpha": 1, "beta": 2}. string: import json io = open("in.json","r")...
Read more >
Read JSON files from the s3 bucket - Databricks Community
Please verify json in some online json validator. Try double quotes in json - had issue with single quotes that one time. Your...
Read more >
Azure function not able to read my json file from my python
Exception while executing function: Functions. ... there I have a file called setting_test.json to get data to run in the code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found