Giter Site home page Giter Site logo

Comments (4)

davidohana avatar davidohana commented on July 21, 2024

I could not reproduce the RuntimeError: dictionary keys changed during iteration issue under Python 3.8 (added a CI build with Python 3.8 which did not raise this exception). However, for the robustness of the code, I did some refactoring to avoid the str-to-int type conversion on load at all. This should solve it.
jsonpickle also updated to v1.5.1.

from drain3.

Sayrus avatar Sayrus commented on July 21, 2024

For what it's worth, persistence lead to this exact error on v0.9.1 (using the examples to make it easier to reproduce):

  • On Python 3.9.1, persistence to a file lead to this result.
Starting Drain3 template miner
Loading configuration from drain3.ini
config file not found: drain3.ini
Checking for saved state
Traceback (most recent call last):
  File "/home/sayrus/Workspace/PERSO/drain3/examples/drain_stdin_demo.py", line 43, in <module>
    template_miner = TemplateMiner(persistence)
  File "/home/sayrus/.local/share/virtualenvs/drain3-sC6cDVeE/lib/python3.9/site-packages/drain3-0.9.1-py3.9.egg/drain3/template_miner.py", line 62, in __init__
  File "/home/sayrus/.local/share/virtualenvs/drain3-sC6cDVeE/lib/python3.9/site-packages/drain3-0.9.1-py3.9.egg/drain3/template_miner.py", line 79, in load_state
  • On Python 3.8.7, it works
  • On Python 3.8.0, it works

from drain3.

davidohana avatar davidohana commented on July 21, 2024

Do you get this error also on v0.9.2?

from drain3.

Sayrus avatar Sayrus commented on July 21, 2024

It is fixed on v0.9.2 !
(Editing the previous message, I did not update the dependency to check on the new version)

from drain3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.