Re: a bug with jinja2 template in Roundup 1.6.1?

Tonu Mikk <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <CABDFm8hkngdVSLhpaoW3=XjXFrg1EQ9-3qtOFdPkQry8+HvdaA@mail.gmail.com>
I did not have an existing config.ini file.  I pointed it to create a new
tracker in a folder that didn't exist.

On Fri, Mar 1, 2019 at 11:09 AM Tom Ekberg <[email protected]> wrote:

> Tonu,
>
>
> I don't use roundup-admin install, but I followed the code. It looks like
> it should put the backend in the config.ini if it doesn't find the file. If
> it finds an already existing config.ini file it looks like it doesn't
> change it. The install function in init.py is called near the end of the
> do_install in admin.py The last few lines of install are:
>
>
>     # if there is no config.ini or old-style config.py
>     # installed from the template, write default config text
>     config_ini_file = os.path.join(instance_home, CoreConfig.INI_FILE)
>     if not os.path.isfile(config_ini_file):
>         config = CoreConfig(settings=settings)
>         config.save(config_ini_file)
>
> Did you have an existing config.ini file for your new tracker?
>
>
>
>
>
>
> ------------------------------
> *From:* Tonu Mikk <[email protected]>
> *Sent:* Friday, March 1, 2019 7:44 AM
> *To:* Tom Ekberg
> *Cc:* [email protected]
> *Subject:* Re: [Roundup-users] a bug with jinja2 template in Roundup
> 1.6.1?
>
> Even when I specify the database backend as "sqlite" during the
> roundup-admin install, it does not include
> # Database backend.
> # Default:
> backend = sqlite
>
> in the config.ini file.
>
> On Thu, Feb 28, 2019 at 8:25 PM Tom Ekberg <[email protected]> wrote:
>
> Tonu,
>
>
> I think it is the fact that a database backend  wasn't specified is the
> problem. If you look at line 41 of roundup/backends/__init__.py you will
> see this:
>
>
> module_name = 'back_%s' % name
>
>
> If name is an empty string then module_name will be 'back_'. The next line
> is the __import__which fails. Maybe the config.ini should specify the
> backend as something benign like sqlilte as a default.
>
>
>
>
>
>
> ------------------------------
> *From:* Tonu Mikk <[email protected]>
> *Sent:* Thursday, February 28, 2019 2:17 PM
> *To:* [email protected]
> *Subject:* [Roundup-users] a bug with jinja2 template in Roundup 1.6.1?
>
> When I run roundup-admin install and choose the jinja2 template it creates
> a config.ini file without the database backend configuration option.
>
> When I try to initialise the tracker it throws an error:
> Traceback (most recent call last):
>   File "/usr/bin/roundup-admin", line 3, in <module>
>     run()
>   File
> "/usr/lib/python2.7/site-packages/roundup/scripts/roundup_admin.py", line
> 49, in run
>     sys.exit(tool.main())
>   File "/usr/lib/python2.7/site-packages/roundup/admin.py", line 1635, in
> main
>     ret = self.run_command(args)
>   File "/usr/lib/python2.7/site-packages/roundup/admin.py", line 1504, in
> run_command
>     return self.do_initialise(self.tracker_home, args)
>   File "/usr/lib/python2.7/site-packages/roundup/admin.py", line 526, in
> do_initialise
>     tracker = roundup.instance.open(tracker_home)
>   File "/usr/lib/python2.7/site-packages/roundup/instance.py", line 327,
> in open
>     return Tracker(tracker_home, optimize=optimize)
>   File "/usr/lib/python2.7/site-packages/roundup/instance.py", line 92, in
> __init__
>     self.backend = backends.get_backend(rdbms_backend)
>   File "/usr/lib/python2.7/site-packages/roundup/backends/__init__.py",
> line 42, in get_backend
>     module = __import__(module_name, vars)
> ImportError: No module named back_
>
> After adding the line to the tracker:
> # Database backend.
> # Default:
> backend = sqlite
>
> The roundup-admin initialise worked without an error.
>
> I wonder if there is a bug with the jinja2 template and Roundup version
> 1.6.1?
> --
> Tonu Mikk
> Adaptive Technologist | Disability Resource Center |
> diversity.umn.edu/disability
> University of Minnesota | umn.edu
> [email protected] | 612-625-3307
>
>
>
> --
> Tonu Mikk
> Adaptive Technologist | Disability Resource Center |
> diversity.umn.edu/disability
> University of Minnesota | umn.edu
> [email protected] | 612-625-3307
>


-- 
Tonu Mikk
Adaptive Technologist | Disability Resource Center |
diversity.umn.edu/disability
University of Minnesota | umn.edu
[email protected] | 612-625-3307

_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
Outlook-f2vydhie.jpg (image/jpeg, 14.3 KB) - not displayed
Outlook-e0yrfzra.jpg (image/jpeg, 14.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.