Giter Site home page Giter Site logo

Comments (7)

sh4nks avatar sh4nks commented on June 1, 2024

Have you activated your virtualenv by running the activate.sh script?

from flaskbb.

rsnyman avatar rsnyman commented on June 1, 2024

That's not strictly necessary (I've been using virtualenv for the better part of 10 years), but I removed and re-created the virtual environment, and re-ran everything.

In the process, I discovered that the version of FlaskBB on PyPI is 2.0.2, whereas the latest version on GitHub is 2.1.0. Additionally, FlaskBB 2.0.2 pins Celery to a version which is incompatible with Python 3.9.

Let me install the version from GitHub, and then get back here with the results.

from flaskbb.

rsnyman avatar rsnyman commented on June 1, 2024

OK, now I am running into various compatibility errors with various packages. I'm guessing all of this is fixed in master, but I'll document it here for anyone who doesn't feel like running the bleeding edge, and would rather work with a release.

  • Jinja2 moved MarkupSafe in v3.1.x (downgrade to v3.0.1)
  • WTForms removed TextField in favour of StringField in v3.x (downgrade to v2.3.3)
  • mistune changed their API in v2.x (downgrade to v0.8.4)
  • itsdangerous removed deprecated classes in v2.1.0 (downgrade to v2.0.1)

And now I'm back to the original error. See my steps below.

$ rm -fr .venv
$ virtualenv -p python3 .venv
created virtual environment CPython3.9.12.final.0-64 in 86ms
$ source .venv/bin/activate
(.venv) $ pip install git+https://github.com/flaskbb/[email protected]
(.venv) $ pip install jinja2==3.0.1
(.venv) $ pip install WTForms==2.3.3
(.venv) $ pip install mistune==0.8.4
(.venv) $ pip install itsdangerous==2.0.1
(.venv) $ flaskbb makeconfig
Error while loading CLI Plugins
Traceback (most recent call last):
  File "/usr/lib/python3.9/logging/config.py", line 564, in configure
    handler = self.configure_handler(handlers[name])
  File "/usr/lib/python3.9/logging/config.py", line 745, in configure_handler
    result = factory(**kwargs)
  File "/usr/lib/python3.9/logging/handlers.py", line 153, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding,
  File "/usr/lib/python3.9/logging/handlers.py", line 58, in __init__
    logging.FileHandler.__init__(self, filename, mode=mode,
  File "/usr/lib/python3.9/logging/__init__.py", line 1146, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.9/logging/__init__.py", line 1175, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding,
FileNotFoundError: [Errno 2] No such file or directory: '.venv/lib/python3.9/site-packages/logs/error.log'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".venv/lib/python3.9/site-packages/flaskbb/cli/main.py", line 63, in _load_flaskbb_plugins
    app = ctx.ensure_object(ScriptInfo).load_app()
  File ".venv/lib/python3.9/site-packages/flask/cli.py", line 382, in load_app
    app = self.create_app()
  File ".venv/lib/python3.9/site-packages/flaskbb/cli/main.py", line 92, in make_app
    return create_app(config_file, instance_path)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 93, in create_app
    configure_app(app, config)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 152, in configure_app
    configure_logging(app)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 401, in configure_logging
    configure_default_logging(app)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 426, in configure_default_logging
    logging.config.dictConfig(app.config["LOG_DEFAULT_CONF"])
  File "/usr/lib/python3.9/logging/config.py", line 809, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python3.9/logging/config.py", line 571, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'errorlog'
Traceback (most recent call last):
  File "/usr/lib/python3.9/logging/config.py", line 564, in configure
    handler = self.configure_handler(handlers[name])
  File "/usr/lib/python3.9/logging/config.py", line 745, in configure_handler
    result = factory(**kwargs)
  File "/usr/lib/python3.9/logging/handlers.py", line 153, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding,
  File "/usr/lib/python3.9/logging/handlers.py", line 58, in __init__
    logging.FileHandler.__init__(self, filename, mode=mode,
  File "/usr/lib/python3.9/logging/__init__.py", line 1146, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.9/logging/__init__.py", line 1175, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding,
FileNotFoundError: [Errno 2] No such file or directory: '.venv/lib/python3.9/site-packages/logs/error.log'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".venv/bin/flaskbb", line 8, in <module>
    sys.exit(flaskbb())
  File ".venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File ".venv/lib/python3.9/site-packages/flask/cli.py", line 579, in main
    return super().main(*args, **kwargs)
  File ".venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File ".venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File ".venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File ".venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File ".venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File ".venv/lib/python3.9/site-packages/flask/cli.py", line 426, in decorator
    with __ctx.ensure_object(ScriptInfo).load_app().app_context():
  File ".venv/lib/python3.9/site-packages/flask/cli.py", line 382, in load_app
    app = self.create_app()
  File ".venv/lib/python3.9/site-packages/flaskbb/cli/main.py", line 92, in make_app
    return create_app(config_file, instance_path)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 93, in create_app
    configure_app(app, config)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 152, in configure_app
    configure_logging(app)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 401, in configure_logging
    configure_default_logging(app)
  File ".venv/lib/python3.9/site-packages/flaskbb/app.py", line 426, in configure_default_logging
    logging.config.dictConfig(app.config["LOG_DEFAULT_CONF"])
  File "/usr/lib/python3.9/logging/config.py", line 809, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python3.9/logging/config.py", line 571, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'errorlog'

from flaskbb.

rsnyman avatar rsnyman commented on June 1, 2024

I just created a brand new virtual environment, and installed master into it via pip. I had to downgrade WTForms and Jinja2, and then I got the same error again when trying to run flaskbb makeconfig.

from flaskbb.

gordonjcp avatar gordonjcp commented on June 1, 2024

The problem is right there in the error message:

FileNotFoundError: [Errno 2] No such file or directory: '.venv/lib/python3.9/site-packages/logs/error.log'

You will find that the directory "logs" does not exist under site-packages.

The fix is to create a directory for your logs, and edit config.cfg line 189 (or thereabouts) to have the absolute path to your log directory.

from flaskbb.

sh4nks avatar sh4nks commented on June 1, 2024

I am closing this as I think @gordonjcp answered your question.

from flaskbb.

rsnyman avatar rsnyman commented on June 1, 2024

@gordonjcp that would work if I had a config file. I don't have one yet, and that is the point, I'm trying to generate one.

Also, I know that there isn't a log files directory there, it's pretty obvious that it is the wrong place.

(.venv) $ flaskbb makeconfig
Error while loading CLI Plugins
...

Anyway, I've largely abandoned thinking of using FlaskBB since there are too many errors and too much needs to be done to make it actually work.

from flaskbb.

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.