Indico.flask - ERROR errors.py:96 -- 'NoneType' object has no attribute 'id'

I think just recreating the virtualenv would be the best option… that way you get all the proper dependency versions

Ok then I should run this:

  • rm -rf ~/.venv
  • virtualenv ~/.venv
  • pip install -U pip setuptools wheel
  • pip install indico
    Is this right? this is a critical machine :wink:
    regards, I

Yes. Since the virtualenv only contains python packages, reinstalling them will be fine. Note: If you use plugins, also pip install indico-plugins at the end.

and of course indico db upgrade. also, check the upgrade to 2.3 notice in the docs.

PS: You should always have a backup of course.

Doesn’t matter, unintalling urllib and botocore and run indico-plugins again do the trick.
The DB upgrade and pluging update works fine:

opt/indico/.venv/local/lib/python2.7/site-packages/indico/core/config.py:177: UserWarning: Ignoring unknown config key ASSETS_DIR
  warnings.warn('Ignoring unknown config key {}'.format(key))
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 620b312814f3 -> eefba82b42c5, Add track_groups table
INFO  [alembic.runtime.migration] Running upgrade eefba82b42c5 -> 1b741c9123f6, Add columns for program codes
INFO  [alembic.runtime.migration] Running upgrade 1b741c9123f6 -> 0f20a5e4018e, Add new abstract state
.......

instance is running again indico 2.3.5 V

OK I see this error now:
2021-05-25 20:16:20,768 0000000000000000 indico.i18n - ERROR app.py:371 – Configured DEFAULT_LOCALE (en_US) does not exist

which is a variable at indico.conf
DEFAULT_LOCALE = ‘en_US’

should thi to be removed for this version?
regards, I

Indico does not have en_US; use en_GB instead.

You might also want to run this script: Localization en_US issue in 2.3.3 - #2 by ThiefMaster

Humm the session in i was logged works, but new users cannot logging with this error:

Selección_116

Sorry for this large session ;(

I see this at indico.log:

File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask_multipass/providers/ldap/util.py", line 138, in ldap_connect
    ldap_connection = ReconnectLDAPObject(settings['uri'], bytes_mode=False)
TypeError: __init__() got an unexpected keyword argument 'bytes_mode'

pip install -U python-ldap

OK…now the indico instance is update an is working.

The initial problem is that the registration form is not showed, looking the console i see this error:
angular.js:6349 Error: Template must have exactly one root element. was:

at angular.js:5068
at angular.js:10043
at wrappedCallback (angular.js:7509)
at wrappedCallback (angular.js:7509)
at angular.js:7582
at Object.$eval (angular.js:8926)
at Object.$digest (angular.js:8789)
at Object.$apply (angular.js:9012)
at done (angular.js:10265)
at completeRequest (angular.js:10449)

This machine is under a reverse proxy:
BASE_URL = ‘https://indico.ifca.es
USE_PROXY = True

Regards, I

Doesn’t sound familiar to me. Do you have a link to a registration form where this happens and that doesn’t require login?

that’s where I get the error (is open right now):


Every thing seems to be OK less the “tickets” manage bottom, that crash:

AttributeError: ‘NoneType’ object has no attribute ‘id’

The complete error is what I put at the beginning of this thread.
Regards I

If you check the contents of https://indico.ifca.es/dist/mod_assets/_/_/_/modules/events/registration/client/js/form/tpls/registrationform.tpl.html you can see some garbage at the end of the file. Not sure where that is coming from - the wheel is fine, and when I download the file from that URL with curl it’s ok as well. But both browsers I tried with show garbage at the end of the file…

image

Go to https://indico.ifca.es/category/0/manage/designer/ and make sure there’s a default badge template selected. Usually this should have been created in one of the indico db upgrade steps, so I’m not sure why you don’t seem to have one…

Template is there.

Did you upgrade from 1.9.11 at some point in the past? That could explain why you do not have a default ticket template but just a default badge template.

Anyway, easy solution: Create a new template on the link above, make sure to add the ticket qr code placeholder to it, and then, after saving it, mark it as the default ticket template.

is posible…I have upgrading this instance from more than 10 year ago.
I have a couple of doubs. I can only choose between poster or badge (supose budge), but i do not undertand the “ticket qr code placeholder to it,”

You create a badge template, and then edit it. In the badge editor itself you can add various placeholders - and one of them is the “Ticket QR Code”.

The Ticket error is solved…but the form doesn’t work yet:
angular.js:6349 Error: Template must have exactly one root element. was: <form novalidate

May be i should askthe creator to removed and create a new one form, in order to remove the garbage at the end of the file.

It is not related to the event. This is a static file, that’s served directly from disk. Does your reverse proxy cache anything by any chance? If yes, try purging that cache.

As you can see in the file’s URL, it has no reference to any particular event.

Nop there is no cache.If i can tomorrow i will try to run this instance directly from IP without a proxy. I you need some other debug please let me know.

Regards, I