noschvie's picture

Hello

what is the proper input value for "Enter tracker home: " of roundup-admin import imports/myExport ?

thanks

Norbert

Forum: 
Tags: 
Jeremy Davis's picture

TBH, I'm not super familiar with the Roundup software so I'm not completely clear. Having said that, I assume that you just need to select a filesystem location that the roundup user has access too (and be sure to run the command as the roundup user).

Looking at the TurnKey buildcode, I can see that the default "tracker" directory is /var/lib/roundup/tracker. So assuming that you want to overwrite the default install, then perhaps that's the path to use?

I'd be interested to hear how you go.

noschvie's picture

your suggested directory works, thanks.

root@roundup ~# roundup-admin  import ./imports/myExport
Enter tracker home: /var/lib/roundup/tracker
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/roundup/admin.py", line 1658, in run_command
    ret = function(args[1:])
  File "/usr/local/lib/python3.7/dist-packages/roundup/admin.py", line 1405, in do_import
    nodeid = cl.import_list(file_props, r)
  File "/usr/local/lib/python3.7/dist-packages/roundup/backends/rdbms_common.py", line 3034, in import_list
    newid = eval_import(proplist[propnames.index("id")])
IndexError: list index out of range

 

The import is starting but lead to an "IndexError: list index out of range" error. Any idea was went wrong ?

Jeremy Davis's picture

As I said, I'm not super familiar with Roundup, so on face value, I have no idea.

Having said that, I did a bit of googling and found this issue. It's very old, but from what I can gather, it appears to be unfixed?! Although it only seems to affect a tracker exported from a SQLite DB backend (our appliance is backed by MySQL/MariaDB). So unless that's where your tracker was exported from, I doubt it's related (and even then, it's quite likely that it may not be related anyway, just a shot in the dark really).

So probably your best bet would be to reach out to the roundup community and see if they have any ideas. It looks like they use mailing lists and I think probably the roundup-users one would be the most appropriate. (sign up here - personally, I wouldn't recommend signing up to the source forge newsletter; but that's up to you).

If you do do that, feel free to cross post a link to your post here. And if you need any further info and/or need a hand with further debugging or whatever, please post back and I'll do my best to help out.

noschvie's picture

> Importing issue - 1

So it's failing on the very first issue.

And the data you sent in a previous message imports perfectly fine here (and includes the first issue).

 

>   File
> "/usr/local/lib/python3.7/dist-packages/roundup/backends/rdbms_common.py", line 3034, in import_list

> root@roundup /# find . -name  rdbms_common.py
> ./home/roundup/.local/lib/python3.7/site-packages/roundup/backends/rdbms_common.py

 

Hmm, this looks like the version you have installed in .local is *not* the one actually run (the one that is used is installed in /usr/local/lib/...).

Python is usually correct in reporting the file where the traceback occurred accurately.

Jeremy Davis's picture

For what it's worth, it's installed to /home/roundup, but symlinked into /usr/local:

root@jed-test-roundup ~# ls -l /usr/local/lib/python3.7/dist-packages/
total 8
lrwxrwxrwx 1 root root 56 Mar 24  2021 roundup -> /home/roundup/.local/lib/python3.7/site-packages/roundup
lrwxrwxrwx 1 root root 72 Mar 24  2021 roundup-2.0.0.dist-info -> /home/roundup/.local/lib/python3.7/site-packages/roundup-2.0.0.dist-info
lrwxrwxrwx 1 root root 72 Nov  4 04:28 roundup-2.1.0.dist-info -> /home/roundup/.local/lib/python3.7/site-packages/roundup-2.1.0.dist-info

Note that the roundup-2.0.0.dist-info link is dead, so you could remove that if you wished. However, it shouldn't cause any issues, so you could just leave it there.

noschvie's picture

blank  lines as part of the *.csv files seems to be the cause for the import issue.

TurnKey Linux Roundup doesn't add such lines to *.csv, but Roundup under Windows.

We want to get the export function fixed.

noschvie's picture

You are right, the export comes from a SQLite DB backend.

Thanks for your reseach, will post it to the roundup mailing list.

noschvie's picture

Ralf from the Roundup user group suggested to upgrade to the lasted Roundup version.

How can this be done with the current image ? Or is a new version of the appliance needed ?

Jeremy Davis's picture

You should be able to update roundup. It's actually not quite as easy as I expected it to be, but it should go something like this:

su - roundup -c "pip3 install 'roundup==2.1.0' --user"

That should complete with the following message:

Successfully installed roundup-2.1.0

Note that you will also probably see a warning like this:

  The scripts roundup-admin, roundup-demo, roundup-gettext, roundup-mailgw, roundup-server and roundup-xmlrpc-server are installed in '/home/roundup/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Instead of adding the path, we put symlinks in /usr/local/bin (which is in the path). So you can safely ignore that.

Then the next step is to migrate the DB:

roundup-admin -i /var/lib/roundup/tracker/ migrate

And update the config:

roundup-admin -i /var/lib/roundup/tracker/ updateconfig /etc/roundup/tracker-config.ini

We also need to adjust some permissions. Plus, the layout of the roundup package appears to have changed quite significantly in v2.1. So we need to update quite a few paths. I am using quite a few variables, which makes it look a bit more complicated than it is really (you should be able to just copy/paste this into your terminal):

# set some vars
RT_TRACKER=/var/lib/roundup/tracker
RT_LOCAL=/home/roundup/.local
LOCAL=/usr/local
PY_V=$(python3 --version | sed "s|^.* \(3\.[0-9]\+\).*|\1|")
RT_VER=2.1.0
LIB_PY=lib/python${PY_V}
SHARE=$RT_LOCAL/$LIB_PY/site-packages/usr/share
DOCS=$SHARE/doc/roundup/html
# set permissions
chmod -R 0775 $RT_LOCAL
chmod -R 0774 $SHARE
SUB_DIRS="_images _sources _static"
for dir in $SUB_DIRS; do
    chmod o+x $DOCS/$dir
done
dir=$DOCS
while [ "$dir" != "$(dirname $RT_LOCAL)" ]; do
    chmod o+x $dir
    dir=$(dirname $dir)
done
# create symlinks
ln -sf $RT_LOCAL/$LIB_PY/site-packages/roundup $LOCAL/$LIB_PY/dist-packages/roundup
ln -sf $RT_LOCAL/$LIB_PY/site-packages/roundup-$RT_VER.dist-info $LOCAL/$LIB_PY/dist-packages/roundup-${RT_VER}.dist-info
ln -sf $SHARE/doc/roundup /var/www/docs
ln -sf $SHARE/man/man1  /usr/local/share/man/man1
# finally update apache config to serve docs from new location
sed -i "s|$RT_LOCAL/share/doc/roundup/html|$SHARE/doc/roundup/html|" /etc/apache2/sites-available/roundup.conf

Now all you should need to do is restart Apache:

systemctl restart apache2
noschvie's picture

have done the upgrade as suggested, but the roundup web page is't available afterwards.

To verify the steps from your post I did also a fresh install of the appliance and tried the upgrade.

Also tried to reboot the VM.

What went wrong ? Thanks!

Please find below the output of the console:

root@roundup ~# su - roundup -c "pip3 install 'roundup==2.1.0' --user"
Collecting roundup==2.1.0
  Downloading https://files.pythonhosted.org/packages/80/6d/3ccdd66551bb89b90758add63b8814b516d7471348675aa564aab032341f/roundup-2.1.0.tar.gz (3.6MB)
    100% |████████████████████████████████| 3.6MB 473kB/s
Building wheels for collected packages: roundup
  Running setup.py bdist_wheel for roundup ... done
  Stored in directory: /home/roundup/.cache/pip/wheels/96/6b/4f/82e98d6a6fc6b28e7a8fc98e4398ba80e2bbfed3dee3de5054
Successfully built roundup
Installing collected packages: roundup
  Found existing installation: roundup 2.0.0
    Uninstalling roundup-2.0.0:
      Successfully uninstalled roundup-2.0.0
  The scripts roundup-admin, roundup-demo, roundup-gettext, roundup-mailgw, roundup-server and roundup-xmlrpc-server are installed in '/home/roundup/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed roundup-2.1.0
root@roundup ~# roundup-admin -i /var/lib/roundup/tracker/ migrate
Tracker updated
root@roundup ~# roundup-admin -i /var/lib/roundup/tracker/ updateconfig /etc/roundup/tracker-config.ini
root@roundup ~# # set some vars
root@roundup ~# RT_TRACKER=/var/lib/roundup/tracker
root@roundup ~# RT_LOCAL=/home/roundup/.local
root@roundup ~# LOCAL=/usr/local
root@roundup ~# PY_V=$(python3 --version | sed "s|^.* \(3\.[0-9]\+\).*|\1|")
done
dir=$DOCS
while [ "$dir" != "$(dirname $RT_LOCAL)" ]; do
    chmod o+x $dir
    dir=$(dirname $dir)
done
# create symlinks
ln -sf $RT_LOCAL/$LIB_PY/site-packages/roundup $LOCAL/$LIB_PY/dist-packages/roundup
ln -sf $RT_LOCAL/$LIB_PY/site-packages/roundup-$RT_VER.dist-info $LOCAL/$LIB_PY/dist-packages/roundup-${RT_VER}.dist-info
ln -sf $SHARE/doc/roundup /var/www/docs
ln -sf $SHARE/man/man1  /usr/local/share/man/man1
# finally update apache config to serve docs from new location
sed -i "s|$RT_LOCAL/share/doc/roundup/html|$SHARE/doc/roundup/html|" /etc/apache2/sites-available/roundup.confroot@roundup ~# RT_VER=2.1.0
root@roundup ~# LIB_PY=lib/python${PY_V}
root@roundup ~# SHARE=$RT_LOCAL/$LIB_PY/site-packages/usr/share
root@roundup ~# DOCS=$SHARE/doc/roundup/html
root@roundup ~# # set permissions
root@roundup ~# chmod -R 0775 $RT_LOCAL
root@roundup ~# chmod -R 0774 $SHARE
root@roundup ~# SUB_DIRS="_images _sources _static"
root@roundup ~# for dir in $SUB_DIRS; do
>     chmod o+x $DOCS/$dir
> done
root@roundup ~# dir=$DOCS
root@roundup ~# while [ "$dir" != "$(dirname $RT_LOCAL)" ]; do
>     chmod o+x $dir
>     dir=$(dirname $dir)
> done
root@roundup ~# # create symlinks
root@roundup ~# ln -sf $RT_LOCAL/$LIB_PY/site-packages/roundup $LOCAL/$LIB_PY/dist-packages/roundup
root@roundup ~# ln -sf $RT_LOCAL/$LIB_PY/site-packages/roundup-$RT_VER.dist-info $LOCAL/$LIB_PY/dist-packages/roundup-${RT_VER}.dist-info
root@roundup ~# ln -sf $SHARE/doc/roundup /var/www/docs
root@roundup ~# ln -sf $SHARE/man/man1  /usr/local/share/man/man1
root@roundup ~# # finally update apache config to serve docs from new location
root@roundup ~# sed -i "s|$RT_LOCAL/share/doc/roundup/html|$SHARE/doc/roundup/html|" /etc/apache2/sites-available/roundup.conf
root@roundup ~#
root@roundup ~#
root@roundup ~# systemctl restart apache2
noschvie's picture

... maybe the restart takes longer ... now the Roundup web is ok. Sorry!

Jeremy Davis's picture

No problem. Glad to hear that it worked (eventually) for you.

Jeremy Davis's picture

Thanks for following up on that and great to hear that you finally worked through it and it appears you are good to go now.

Please do not hesitate to drop in again if you have any further issues, questions or suggestions for us.

noschvie's picture

the dump was imported and all issue and messages are available.

Fields like "priority" and "Assigned to" can be modified, but the "Change note" field leads to the erro below:

any idea how to debug? Thanks!

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

 

Jeremy Davis's picture

My guess is that python has thrown an error. If I'm right, then there should be a stacktrace in the Apache log. You should find the Apache log /var/log/apache2/error.log. I.e. something like this (to show last 20 lines of log):

tail -20 /var/log/apache2/error.log

If you are unsure, feel free to post the output and I may be able to give some ideas. Although please note that I may not get a chance to respond until Monday.

noschvie's picture

please find below the output of /var/log/apache2/error.log

[Sat Nov 06 03:58:30.146603 2021] [wsgi:error] [pid 1409:tid 140647059142400] [client 192.168.1.101:52510] mod_wsgi (pid=1409): Exception occurred processing WSGI script '/var/lib/roundup/tracker/wsgi.py'., referer: https://roundup.neunzehn.at/issue10482
[Sat Nov 06 03:58:30.146671 2021] [wsgi:error] [pid 1409:tid 140647059142400] [client 192.168.1.101:52510] RuntimeError: response has not be
en started, referer: https://roundup.neunzehn.at/issue10482

 

Output \var\log\apache2\error.log.1


[Fri Nov 05 20:18:24.802125 2021] [wsgi:error] [pid 1168:tid 140116515432192] [client 192.168.1.101:65164] mod_wsgi (pid=1168): Exception occurred processing WSGI script '/var/lib/roundup/tracker/wsgi.py'., referer: https://roundup.neunzehn.at/issue10482?@template=item&@pagesize=50&@startwith=0
[Fri Nov 05 20:18:24.802191 2021] [wsgi:error] [pid 1168:tid 140116515432192] [client 192.168.1.101:65164] RuntimeError: response has not been started, referer: https://roundup.neunzehn.at/issue10482?@template=item&@pagesize=50&@startwith=0
Exception ignored in: <function FieldStorage.__del__ at 0x7f6f58f76e18>
Traceback (most recent call last):
  File "/usr/lib/python3.7/cgi.py", line 496, in __del__
NameError: name 'AttributeError' is not defined
Exception ignored in: <function FieldStorage.__del__ at 0x7f6f58f76e18>
Traceback (most recent call last):
  File "/usr/lib/python3.7/cgi.py", line 496, in __del__
NameError: name 'AttributeError' is not defined
Jeremy Davis's picture

To be honest, I wasn't at all clear where an issue like this would come from. 'AttributeError' is part of the Python standard library so seeing an error saying that it is not defined seemed crazy to me.

However, I did a bit of googling and came across a very similar wsgi error (it's Django running on Ubuntu, but close enough for our purposes). Graham (the mod_wsgi developer) explains the likely problem. Although that more explains the actual underlying issue, not the direct cause in your scenario. Reading on, it seems that it may be related to a lazy loaded module. TBH, I'm not 100%, but I suggest first adding the 'WSGIApplicationGroup %{GLOBAL}' directive (as Graham suggests here) to your Apache config. I'd give that a go (add it to /etc/apache2/sites-available/roundup.conf, I suggest under the existing 'WSGIScriptAlias' line) and restart Apache:

systemctl restart apache2

If the issue continues, then please add in the 'LogLevel info' directive (again in /etc/apache2/sites-available/roundup.conf) and restart Apache again. Then try to recreate the issue and post the log again and we'll see what we can see. Hopefully that might asist us to understand a bit more.

There is still a chance that we may need to call on the assistance of the Roundup guys again, but perhaps we can work it out?!

noschvie's picture

An incomplete mail configuration of the Roundup application leads to this issue of the GUI.

Jeremy Davis's picture

Ok, glad to hear that you got it working.

Add new comment