GenealogyCollective / gprime-archive

Genealogy Software
https://genealogycollective.github.io/gprime/
GNU General Public License v2.0
31 stars 7 forks source link

Error: 500 POST /person/add #25

Open kenberland opened 5 years ago

kenberland commented 5 years ago

[also on /person/[:id]/edit]

ken@ken: ~$ python --version
Python 3.6.7
ken@ken: ~$ pip list
Package    Version
---------- -------
gprime     0.0.5  
meta       1.0.2  
passlib    1.7.1  
Pillow     5.3.0  
pip        10.0.1 
PyICU      2.2    
setuptools 39.0.1 
simplejson 3.16.0 
tornado    5.1.1  
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Logs:

[W 181020 19:47:27 forms:374] field 'gender' not found in form; valid fields: ['primary_name.type', 'primary_name.title', 'primary_name.nick', 'primary_name.call', 'primary_name.first_name', 'primary_name.suffix', 'primary_name.surname_list.0.prefix', 'primary_name.surname_list.0.surname', 'primary_name.surname_list.0.origintype', 'gender', 'gid', 'tag_list', 'private']
[E 181020 19:47:27 web:1670] Uncaught exception POST /person/add (::1)
    HTTPServerRequest(protocol='http', host='localhost:8000', method='POST', uri='/person/add', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/home/ken/.local/lib/python3.6/site-packages/tornado/web.py", line 1590, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/home/ken/.local/lib/python3.6/site-packages/tornado/web.py", line 3006, in wrapper
        return method(self, *args, **kwargs)
      File "/home/ken/.local/lib/python3.6/site-packages/gprime/app/handlers/personhandler.py", line 87, in post
        form.save(handler=self)
      File "/home/ken/.local/lib/python3.6/site-packages/gprime/app/forms/forms.py", line 381, in save
        commit(self.instance, trans)
      File "/home/ken/.local/lib/python3.6/site-packages/gprime/plugins/db/dbapi/dbapi.py", line 703, in commit_person
        person.to_struct())
      File "/home/ken/.local/lib/python3.6/site-packages/gprime/db/txn.py", line 181, in add
        json.dumps((obj_type, trans_type, handle, old_data, new_data), 1))
    TypeError: dumps() takes 1 positional argument but 2 were given
[E 181020 19:47:27 web:2162] 500 POST /person/add (::1) 30.72ms
kenberland commented 5 years ago

Gprime won't let me add or edit people. This is both with new databases and db's imported from Gramps.

dsblank commented 5 years ago

Hmm. Don't see what's wrong looking over that. I've stopped working on this version of gprime, and am starting a new version from scratch based on a Python + Javascript framework. If you (or others) do make a fix, I'd be glad to apply a Pull Request though.