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.

Pickling the knowledge base

See original GitHub issue

I have a project, where FastCFG runs for several minutes. To speed up things, I wanted to serialize out (pickle) project.kb but got an exception.

Is there a standard way of serializing the knowledge base, so I don’t need to recalculate it every time I load the project? If not, could you add support to it?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
zarduscommented, Dec 10, 2016

Using pickle’s default protocol is going to lead to sadness. Have you tried the latest protocol? That’d be pickle.dump(kb, outfile, -1)

On Dec 10, 2016 8:58 AM, “frapik99” notifications@github.com wrote:

Hi @axt https://github.com/axt, I had similar error… Add a print at File “/home/axt/.virtualenvs/angrc/ lib/python2.7/copy_reg.py:77” so you can see what class is creating problem. For that class add setstate and getstate

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/angr/angr/issues/289#issuecomment-266229610, or mute the thread https://github.com/notifications/unsubscribe-auth/ADSzlzN9uBy_sSB8lmLAi2i2xEISBLrIks5rGvZEgaJpZM4LJtuZ .

0reactions
axtcommented, Dec 11, 2016

@zardus : Thanks, it’s working!

Read more comments on GitHub >

github_iconTop Results From Across the Web

pickle — Python object serialization — Python 3.11.1 ...
“Pickling” is the process whereby a Python object hierarchy is converted into a byte stream, and “unpickling” is the inverse operation, whereby a...
Read more >
The ultimate guide to Python pickle - Snyk
This article will teach you how to safely use Python's built-in pickle library to maintain persistence within complex data structures.
Read more >
Understanding Python pickling and how to use it securely
In Python, you can use pickle to serialize (deserialize) an object structure into (from) a byte stream. Here are best practices for secure ......
Read more >
The Science of Pickling and Fermentations - Asia Society
Pickling is the process of using an acidic brine to preserve a food. Acidic brines are made with either salty water, sugar water,...
Read more >
How to Pickle: A Pickling and Unpickling Tutorial
philosophy), but pickling helps us achieve that since it converts any kind of complex data to 0s and 1s (byte streams). This process...
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