Giter VIP home page Giter VIP logo

Comments (5)

clach04 avatar clach04 commented on May 14, 2024

Updating example.py to use;

from flask_bootstrap import Bootstrap
from flask_script import Manager, Shell

Then fails with a different message:

Traceback (most recent call last):
  File "example.py", line 15, in <module>
    from flask_ponywhoosh import PonyWhoosh
  File "C:\Users\clach04\py\pony_whoosh_flask\p3PonyWooshFlask\lib\site-packages\flask_ponywhoosh\__init__.py", line 40
    if app is not None:
                      ^
TabError: inconsistent use of tabs and spaces in indentation

Line 38, first line of PonyWhoosh() is indented with a tab. Fixing this then leads to:

Traceback (most recent call last):
  File "example.py", line 15, in <module>
    from flask_ponywhoosh import PonyWhoosh
  File "C:\Users\clach04\py\pony_whoosh_flask\p3PonyWooshFlask\lib\site-packages\flask_ponywhoosh\__init__.py", line 66
    print 'PONYWHOOSH_DEBUG -> ', self.debug
                               ^
SyntaxError: Missing parentheses in call to 'print'

There are multiple py2.x print statements.

Fixing those leads to:

Traceback (most recent call last):
  File "example.py", line 15, in <module>
    from flask_ponywhoosh import PonyWhoosh
  File "C:\Users\clach04\py\pony_whoosh_flask\p3PonyWooshFlask\lib\site-packages\flask_ponywhoosh\__init__.py", line 16, in <module>
    from ponywhoosh import PonyWhoosh as MyPonyWhoosh
  File "C:\Users\clach04\py\pony_whoosh_flask\p3PonyWooshFlask\lib\site-packages\ponywhoosh\__init__.py", line 13, in <module>
    from core import PonyWhoosh
ImportError: No module named 'core'

Fixing that via:

from ponywhoosh.core import PonyWhoosh

Then leads to more print statement issues

from flask-ponywhoosh.

clach04 avatar clach04 commented on May 14, 2024

Python 2.7 with:

pip install flask-ponywhoosh flask_script

and update example as per above allows:

python example.py runserver

to run

from flask-ponywhoosh.

jonaprieto avatar jonaprieto commented on May 14, 2024

The print issues is because to date we don't have support for python 3. And with python 2.7 everything should be fine. Without any update, it is failing?

from flask-ponywhoosh.

clach04 avatar clach04 commented on May 14, 2024

Sorry, my mistake! I'd been reading PonyORM docs and saw py3 support (and dropping py2.6) and got that lodged in my brain. I just logged pull request #4 for the example update to use the non-deprecated Flask pieces

from flask-ponywhoosh.

jonaprieto avatar jonaprieto commented on May 14, 2024

Your PR was accepted. Thanks.

from flask-ponywhoosh.

Related Issues (19)

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.