2017-03-15 17:40:04.006775: Attempting to update <ISP u'tmp-fai'>
last successful update=2015-09-0715:35:52.376574+02:00lastupdate attempt=2017-03-1517:20:03.941921+01:00nextupdate was scheduled 554days, 15:04:11.630406 ago
strike=0
Traceback (most recent calllast):
File"ffdnispdb/cron_task.py", line 113, in <module>
db.session.commit()
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, indoreturn getattr(self.registry(), name)(*args, **kwargs)
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, incommit
self.transaction.commit()
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 361, incommit
self.session.dispatch.after_commit(self.session)
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__
fn(*args, **kw)
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 170, in session_signal_after_commit
models_committed.send(session.app, changes=d.values())
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/blinker/base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File"/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 294, in _after_flush
cls.update_document(writer, model)
File"/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 277, in update_document
writer.update_document(**kw)
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/writing.py", line 477, in update_document
self.add_document(**fields)
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/writing.py", line 750, in add_document
for tbytes, freq, weight, vbytes in items:
File"/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/fields.py", line 166, inindexraise ValueError("%r is not unicode or sequence" % value)
ValueError: ''isnotunicodeorsequence
```
2017-03-15 17:40:04.006775: Attempting to update <ISP u'tmp-fai'>
last successful update=2015-09-07 15:35:52.376574+02:00
last update attempt=2017-03-15 17:20:03.941921+01:00
next update was scheduled 554 days, 15:04:11.630406 ago
strike=0
Traceback (most recent call last):
File "ffdnispdb/cron_task.py", line 113, in <module>
db.session.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, in commit
self.transaction.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 361, in commit
self.session.dispatch.after_commit(self.session)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__
fn(*args, **kw)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 170, in session_signal_after_commit
models_committed.send(session.app, changes=d.values())
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/blinker/base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 294, in _after_flush
cls.update_document(writer, model)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 277, in update_document
writer.update_document(**kw)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/writing.py", line 477, in update_document
self.add_document(**fields)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/writing.py", line 750, in add_document
for tbytes, freq, weight, vbytes in items:
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/fields.py", line 166, in index
raise ValueError("%r is not unicode or sequence" % value)
ValueError: '' is not unicode or sequence
```
```
❯ curl -s https://mycelium-fai.org/isp.json
{
"name": "Mycélium",
"description": "Essaimage dans la région lilloise",
"website": "https://mycelium-fai.org/",
"email": "chti-data-network@lists.ffdn.org",
"mainMailingList": "chti-data-network@lists.ffdn.org",
"progressStatus": 1,
"memberCount": 5,
"subscriberCount": 0,
"chatrooms": [
"irc://irc.geeknode.net/#tmp-fai"
],
"coordinates": {
"latitude": 50.6296,
"longitude": 3.0704
},
"coveredAreas": [
],
"version": 0.1
}
```
The error was actually caused by the empty field 'covered_areas'.
The problem has been solved with commit 0f6c1645d5.
I think this issue can be closed now.
The error was actually caused by the empty field 'covered_areas'.
The problem has been solved with commit 0f6c1645d5547ca77fac170958360598a4e6e4ad.
2017-03-15 17:40:04.006775: Attempting to update <ISP u'tmp-fai'> last successful update=2015-09-07 15:35:52.376574+02:00 last update attempt=2017-03-15 17:20:03.941921+01:00 next update was scheduled 554 days, 15:04:11.630406 ago strike=0 Traceback (most recent call last): File "ffdnispdb/cron_task.py", line 113, in <module> db.session.commit() File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do return getattr(self.registry(), name)(*args, **kwargs) File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, in commit self.transaction.commit() File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 361, in commit self.session.dispatch.after_commit(self.session) File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__ fn(*args, **kw) File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 170, in session_signal_after_commit models_committed.send(session.app, changes=d.values()) File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/blinker/base.py", line 267, in send for receiver in self.receivers_for(sender)] File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 294, in _after_flush cls.update_document(writer, model) File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 277, in update_document writer.update_document(**kw) File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/writing.py", line 477, in update_document self.add_document(**fields) File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/writing.py", line 750, in add_document for tbytes, freq, weight, vbytes in items: File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/whoosh/fields.py", line 166, in index raise ValueError("%r is not unicode or sequence" % value) ValueError: '' is not unicode or sequence
❯ curl -s https://mycelium-fai.org/isp.json { "name": "Mycélium", "description": "Essaimage dans la région lilloise", "website": "https://mycelium-fai.org/", "email": "chti-data-network@lists.ffdn.org", "mainMailingList": "chti-data-network@lists.ffdn.org", "progressStatus": 1, "memberCount": 5, "subscriberCount": 0, "chatrooms": [ "irc://irc.geeknode.net/#tmp-fai" ], "coordinates": { "latitude": 50.6296, "longitude": 3.0704 }, "coveredAreas": [ ], "version": 0.1 }
I have installed ffdn-db on Debian 8 and I don't have this error when I upload the JSON automatically from the website...
Oh neat! Could you share a
pip freeze
orpip list
?Thanks in advance!
Sorry I haven't noticed your answer...
So, there is the output of
pip freeze
:Babel==2.4.0 Flask==0.10.1 Flask-Babel==0.9 Flask-Cache==0.12 Flask-Mail==0.9.0 Flask-SQLAlchemy==1.0 Flask-Script==0.6.6 Flask-WTF==0.9.4 GeoAlchemy==0.7.2 Jinja2==2.7.1 MarkupSafe==0.18 SQLAlchemy==0.8.4 WTForms==1.0.5 Werkzeug==0.9.4 Whoosh==2.5.6 argparse==1.2.1 blinker==1.3 docutils==0.11 gevent==1.0.2 greenlet==0.4.12 gunicorn==19.7.1 -e git+https://code.ffdn.org/ffdn/isp-format.git@73ff624c883bddbedda4bac30d795872cbd34396#egg=isp_format-master itsdangerous==0.23 jsonschema==2.3.0 -e git+https://code.ffdn.org/FFDN/ndg_httpsclient.git@50289e2eb0e5dd5fa539a5b7487e30296812a0da#egg=ndg_httpsclient-master pyOpenSSL==17.2.0 pyasn1==0.1.7 pytz==2017.2 requests==2.6.0 six==1.10.0 speaklater==1.3 wsgiref==0.1.2
And there is the output of the
pip list
:argparse (1.2.1) Babel (2.4.0) blinker (1.3) docutils (0.11) Flask (0.10.1) Flask-Babel (0.9) Flask-Cache (0.12) Flask-Mail (0.9.0) Flask-Script (0.6.6) Flask-SQLAlchemy (1.0) Flask-WTF (0.9.4) GeoAlchemy (0.7.2) gevent (1.0.2) greenlet (0.4.12) gunicorn (19.7.1) isp-format (0.1.3, /root/ffdn-db/.virtualenv/src/isp-format) itsdangerous (0.23) Jinja2 (2.7.1) jsonschema (2.3.0) MarkupSafe (0.18) ndg-httpsclient (0.3.2, /root/ffdn-db/.virtualenv/src/ndg-httpsclient) pip (1.5.6) pyasn1 (0.1.7) pyOpenSSL (17.2.0) pytz (2017.2) requests (2.6.0) setuptools (5.5.1) six (1.10.0) speaklater (1.3) SQLAlchemy (0.8.4) Werkzeug (0.9.4) Whoosh (2.5.6) wsgiref (0.1.2) WTForms (1.0.5)
I think this issue can be closed now.
The error was actually caused by the empty field 'covered_areas'. The problem has been solved with commit
0f6c1645d5
.@pitchum indeed, you can close it :)