Git Product home page Git Product logo

Comments (13)

zw1765 avatar zw1765 commented on July 17, 2024

我已经安装了python-dotenv
pip show python-dotenv
Name: python-dotenv
Version: 0.14.0

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

输入flask --help看看输出啥

from blogin.

zw1765 avatar zw1765 commented on July 17, 2024

File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 240, in locate_app
import(module_name)
File "/home/zw/code/Blogin/blogin/init.py", line 32, in
from blogin.blueprint.front.rss import rss_bp
File "/home/zw/code/Blogin/blogin/blueprint/front/rss.py", line 9, in
from feedgen.feed import FeedGenerator
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/feedgen/feed.py", line 17, in
from lxml import etree # nosec - not using this for parsing
ImportError: /home/zw/Downloads/yes/lib/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 556, in list_commands
rv.update(info.load_app().cli.list_commands(ctx))
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 388, in load_app
app = locate_app(self, import_name, name)
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 245, in locate_app
raise NoAppException(
flask.cli.NoAppException: While importing "blogin", an ImportError was raised:

Traceback (most recent call last):
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 240, in locate_app
import(module_name)
File "/home/zw/code/Blogin/blogin/init.py", line 32, in
from blogin.blueprint.front.rss import rss_bp
File "/home/zw/code/Blogin/blogin/blueprint/front/rss.py", line 9, in
from feedgen.feed import FeedGenerator
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/feedgen/feed.py", line 17, in
from lxml import etree # nosec - not using this for parsing
ImportError: /home/zw/Downloads/yes/lib/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send

Usage: flask [OPTIONS] COMMAND [ARGS]...

A general utility script for Flask applications.

Provides commands from Flask, extensions, and the application. Loads the
application defined in the FLASK_APP environment variable, or from a
wsgi.py file. Setting the FLASK_ENV environment variable to 'development'
will enable debug mode.

$ export FLASK_APP=hello.py
$ export FLASK_ENV=development
$ flask run

Options:
--version Show the flask version
--help Show this message and exit.

Commands:
db Perform database migrations.
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

ImportError: /home/zw/Downloads/yes/lib/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
这里有问题

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

你升级一下feedgen这个的版本试试

from blogin.

zw1765 avatar zw1765 commented on July 17, 2024

上面的问题解决了,是我的python版本过高的问题。
现在我完成了上面的步骤,出现了登录界面打不开

from blogin.

zw1765 avatar zw1765 commented on July 17, 2024
  • Detected change in '/home/zw/code/Blogin/blogin/models.py', reloading
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 218-395-850
    127.0.0.1 - - [18/Oct/2023 14:39:31] "GET /auth/login/ HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 2464, in call
    return self.wsgi_app(environ, start_response)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/home/zw/code/Blogin/blogin/blueprint/front/auth.py", line 53, in login
    ban_ip = rd.get(str(remote_ip))
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/redis/client.py", line 1606, in get
    return self.execute_command('GET', name)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/redis/client.py", line 901, in execute_command
    return self.parse_response(conn, command_name, **options)
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/redis/client.py", line 915, in parse_response
    response = connection.read_response()
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/redis/connection.py", line 739, in read_response
    response = self._parser.read_response()
    File "/home/zw/code/Blogin/venv/lib/python3.8/site-packages/redis/connection.py", line 340, in read_response
    raise error
    redis.exceptions.AuthenticationError: Authentication required.
    127.0.0.1 - - [18/Oct/2023 14:39:32] "GET /auth/login/?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
    127.0.0.1 - - [18/Oct/2023 14:39:32] "GET /auth/login/?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
    127.0.0.1 - - [18/Oct/2023 14:39:32] "GET /auth/login/?debugger=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
    127.0.0.1 - - [18/Oct/2023 14:39:32] "GET /auth/login/?debugger=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
    127.0.0.1 - - [18/Oct/2023 14:39:32] "GET /auth/login/?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
    127.0.0.1 - - [18/Oct/2023 14:39:32] "GET /auth/login/?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 200 -

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

redis配置不对

from blogin.

zw1765 avatar zw1765 commented on July 17, 2024

需要在哪里设置redis账号密码呢

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

你看ban_ip = rd.get(str(remote_ip))这句代码的rd在哪里定义的,就在那里配置。

from blogin.

zw1765 avatar zw1765 commented on July 17, 2024

好的,感谢指导

from blogin.

zw1765 avatar zw1765 commented on July 17, 2024

后台管理,怎么打开呀。我登录了管理员用户,找不到新建博客等内容

from blogin.

jingk-1992 avatar jingk-1992 commented on July 17, 2024

老铁找到了吗,我也没找到

from blogin.

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.