Giter VIP home page Giter VIP logo

Comments (7)

CodeOne91 avatar CodeOne91 commented on June 12, 2024 1

I solved the same problem using werkzeug 0.16.
Worked for me.

from openmtc.

mKay00 avatar mKay00 commented on June 12, 2024

I have a related issue. I am trying to run the minimal application from https://fiware-openmtc.readthedocs.io/en/latest/sdk-framework/index.html and when I run it, I get the same ImportError of 'Accept' as you in the same file.

Traceback (most recent call last):
  File "client.py", line 1, in <module>
    from openmtc_app.onem2m import XAE
  File "/usr/local/lib/python3.5/dist-packages/openmtc_app/onem2m.py", line 28, in <module>
    from openmtc_app.notification import NotificationManager
  File "/usr/local/lib/python3.5/dist-packages/openmtc_app/notification/__init__.py", line 11, in <module>
    from openmtc_onem2m.serializer import get_onem2m_decoder
  File "/usr/local/lib/python3.5/dist-packages/openmtc_onem2m/serializer/__init__.py", line 3, in <module>
    from werkzeug import Accept, parse_accept_header
ImportError: cannot import name 'Accept'

My guess is that there is a version incompatibility, but I am not sure. I am going to try different versions tomorrow, maybe I find a working one.
Currently, I am using:

  • Python 3.5.3
  • werkzeug 1.0.0
  • openMTC latest master

from openmtc.

juliopovedacs avatar juliopovedacs commented on June 12, 2024

Hello.

Thanks @mKay00 and @CodeOne91 for your comments.

@CodeOne91 how can I downgrade werkzeug please? I execute pip3 freeze in my terminal window and werkzeug does not even appear.

Thank you for your help.

from openmtc.

juliopovedacs avatar juliopovedacs commented on June 12, 2024

I found there is a dependencies.txt file inside openmtc-gevent, and it has the following line: werkzeug>=0.9.

So, I changed it to werkzeug==0.16, saved the file, deleted the previous gateway image I had built and created a new gateway image (with the ./create-binary-docker gateway command).

However, I still get the "Failed to connect to localhost port 8000: Connection refused" when I try to create an application resource.

I checked my terminal window and my change to the werkzeug version was ignored.

Can someone help me please?

Thank you.

from openmtc.

juliopovedacs avatar juliopovedacs commented on June 12, 2024

Hello.

I was able to downgrade werkzeug to version 0.16 as @CodeOne91 said by editing the following files:

  1. openmtc-gevent/dependencies.txt
    Changed line 9: werkzeug==0.16
  2. setup-sdk.py
    Changed line 21: "urllib3", "gevent (>=1.0)", "iso8601 (>=0.1.5)", "werkzeug (==0.16)",
    Changed line 26: "urllib3", "gevent >= 1.0", "iso8601 >= 0.1.5", "werkzeug == 0.16",
  3. setup-gevent-all.py
    Changed line 27: "urllib3", "gevent (>=1.0)", "iso8601 (>=0.1.5)", "werkzeug (==0.16)",
    Changed line 35: "urllib3", "gevent >= 1.0", "iso8601 >= 0.1.5", "werkzeug == 0.16",

With these changes, deleting previous built gateway image and building a new gateway image, OpenMTC works again.

from openmtc.

CodeOne91 avatar CodeOne91 commented on June 12, 2024

@japoveda10 sorry for being late. You can try this command in future:
sudo -H pip3 install Werkzeug==0.16.0
python version 3.5

from openmtc.

juliopovedacs avatar juliopovedacs commented on June 12, 2024

No worries. Thank you @CodeOne91!

from openmtc.

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.