Giter Site home page Giter Site logo

Comments (10)

mthbrown avatar mthbrown commented on May 13, 2024 1

In case anyone runs into this in the future, this is probably due to you installing the wrong benedict module. Instead of:

pip install benedict

you should run:

pip install python-benedict

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on May 13, 2024

Check how you import it.
I think you are doing:

import benedict

instead of:

from benedict import benedict

from python-benedict.

hagfelsh avatar hagfelsh commented on May 13, 2024

I did originally have that mistake, yes! However here's the whole file: (the traceback is the same of course)

from benedict import benedict

d = benedict()
d['profile', 'firstname'] = 'Fabio'
print(d)

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on May 13, 2024

I don’t think the traceback is the same, could you check it please?

from python-benedict.

hagfelsh avatar hagfelsh commented on May 13, 2024

Sure thing!

Traceback (most recent call last):
  File "/home/hagfelsh/.PyCharmCE2019.3/config/scratches/benedict-test.py", line 3, in <module>
    d = benedict()
TypeError: 'module' object is not callable

Process finished with exit code 1

In pycharm there are some deeper parts of the traceback. I'm new to python so I'm not sure what in here is valuable. Here are some that look like they might be:

exception/type/args = {getset_descriptor} <attribute 'args' of 'BaseException' objects>

traceback_frame/stack[4] = 'frame: <module> [pydevd.py:2127]  id:35889816'

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on May 13, 2024

I don't think this is a library problem, this snipped of code works perfectly:

from benedict import benedict

d = benedict()
d['profile', 'firstname'] = 'Fabio'
print(d)

and prints:

{'profile': {'firstname': 'Fabio'}}

from python-benedict.

hagfelsh avatar hagfelsh commented on May 13, 2024

Well that's interesting! I wonder what's wrong in my environment! I'll cook up a new venv and try it there. Thanks for such fast responses :)

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on May 13, 2024

Ok, don't worry! If you find any bug please provide also a failing test case to speed up bug fixing.

from python-benedict.

flutterq avatar flutterq commented on May 13, 2024

All possible working solution at [Solved] TypeError: ‘module’ object is not callable

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on May 13, 2024

@mthbrown thanks for clarifying the issue, it will surely be useful to someone else.

from python-benedict.

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.