briot / geneapro

Genealogical software based on the GenTech data model
http://briot.github.com/geneapro/
GNU General Public License v2.0
33 stars 8 forks source link

With a fresh install, fresh import of very large file, PersonaList fails. #48

Closed changeling closed 5 years ago

changeling commented 5 years ago

On a fresh install, with an import of the ManyMany... ged file, geneaprove fails on ValueError: invalid literal for int() with base 10: '[object Object]' when requesting All persons. Stack trace follows.

2019-02-19 16:59:35,881 get geneaprove.views.persona.PersonaList.get(<JSONViewParams: {'theme': ['[object Object]']}>)
2019-02-19 16:59:35,942 get geneaprove.views.themelist.ThemeList.get(<JSONViewParams: {}>)
2019-02-19 16:59:35,945 __internal convert to json
2019-02-19 16:59:35,946 __internal send response
2019-02-19 16:59:35,917 handle_uncaught_exception Internal Server Error: /data/persona/list
Traceback (most recent call last):
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/backend/geneaprove/views/to_json.py", line 173, in get
    return self.__internal(self.get_json, params, *args, **kwargs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/backend/geneaprove/views/to_json.py", line 158, in __internal
    resp = method(params, *args, **kwargs) or {"success": True}
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 52, in inner
    return func(*args, **kwds)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/backend/geneaprove/views/persona.py", line 254, in get_json
    styles = Styles(theme_id, graph=global_graph, decujus=decujus)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/backend/geneaprove/views/styles.py", line 68, in __init__
    .get(id=theme_id)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/query.py", line 376, in get
    clone = self.filter(*args, **kwargs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/query.py", line 796, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/query.py", line 814, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1227, in add_q
    clause, _ = self._add_q(q_object, self.used_aliases)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1253, in _add_q
    allow_joins=allow_joins, split_subq=split_subq,
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1187, in build_filter
    condition = self.build_lookup(lookups, col, value)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1083, in build_lookup
    return final_lookup(lhs, rhs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/lookups.py", line 19, in __init__
    self.rhs = self.get_prep_lookup()
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/lookups.py", line 59, in get_prep_lookup
    return self.lhs.output_field.get_prep_value(self.rhs)
  File "/Users/clarson/Desktop/geneapro-test-django-branch/python_env/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 946, in get_prep_value
    return int(value)
ValueError: invalid literal for int() with base 10: '[object Object]'
2019-02-19 16:59:35,947 log_message "GET /data/themelist HTTP/1.1" 200 18
2019-02-19 16:59:36,232 log_message "GET /data/persona/list?theme=[object%20Object] HTTP/1.1" 500 27
briot commented 5 years ago

Duplicate of #49