Closed dbrgn closed 10 years ago
Added a workaround. Please review, @cfaessler or @d22.
Additionally, this commit adds status output to the importswid command and fixes some encoding issues.
Upon trying the importswid
command a got the following exception:
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1.1\helpers\pycharm\django_manage.py", line 23, in <module>
run_module(manage_file, None, '__main__', True)
File "C:\Python27\Lib\runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "C:\Python27\Lib\runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "C:\Python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\git\BA\strongTNC\manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\chrigi\tnc-django\lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line
utility.execute()
File "C:\Users\chrigi\tnc-django\lib\site-packages\django\core\management\__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\chrigi\tnc-django\lib\site-packages\django\core\management\base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Users\chrigi\tnc-django\lib\site-packages\django\core\management\base.py", line 285, in execute
output = self.handle(*args, **options)
File "C:/git/BA/strongTNC\apps\swid\management\commands\importswid.py", line 39, in handle
self.stdout.write('Processed {0}'.format(tag).encode(self.stdout.encoding, 'replace'))
TypeError: encode() argument 1 must be string, not None
When using the
importswid
command onDropbox/BA/swid-tags-full-jfu.txt
, it fails on several packages with the following trace:This appears to be an SQLite issue. Apparently SQLite does not allow more than 999 parameters to be present. If more than 999 files are assigned to a tag, all those PKs are sent to the DB in a single query.
We could start splitting the queries into smaller chunks. Although I still think that SQLite should be avoided and that the docs and README should discourage its use.