Can't upgrade: AttributeError: 'NoneType' object has no attribute 'split'

Hi Kyle,
I am getting this error while upgrading from 8.15.1. I recently forced upgrade for PCF8574 issue. Is that the reason for this error?

File "/home/mycopitt/Mycodo/mycodo/mycodo_flask/routes_admin.py", line 534, in admin_upgrade
current_latest_major_version = current_latest_release.split('.')[0]
AttributeError: 'NoneType' object has no attribute 'split'
1 Like

I tried to run the command mentioned but I am getting following error
sed: couldn’t open temporary file /home/admin/Mycodo/mycodo/utils/sedqTrTll: Permission denied

1 Like

Thanks for the feedback. I updated the command in the issue to include “sudo”.

1 Like

Done… working perfectly

1 Like

I recently noticed mycodo had a new update available, but when I click on the icon I am redirected to this message “Error 500: internal server error”
I haven’t tried using my backups yet, incase there is a simple fix.

Version: 8.15.1
Database: 16b28ef31b5b
Model: Raspberry Pi 3 Model B Rev 1.2

Release:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Firmware:
b''

Error (Full Traceback):

Traceback (most recent call last):
  File "/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/mycodo-root/env/lib/python3.9/site-packages/flask_restx/api.py", line 675, in error_router
    return original_handler(e)
  File "/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/var/mycodo-root/env/lib/python3.9/site-packages/flask_login/utils.py", line 290, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
  File "/home/joe/Mycodo/mycodo/mycodo_flask/routes_admin.py", line 534, in admin_upgrade
    current_latest_major_version = current_latest_release.split('.')[0]
AttributeError: 'NoneType' object has no attribute 'split'

I have the same problem:

Version: 8.15.1
Database: 16b28ef31b5b
Model: Raspberry Pi 4 Model B Rev 1.5

Release:
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Firmware:
b’’

Error (Full Traceback):

Traceback (most recent call last):
File “/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py”, line 2525, in wsgi_app
response = self.full_dispatch_request()
File “/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py”, line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/var/mycodo-root/env/lib/python3.9/site-packages/flask_restx/api.py”, line 675, in error_router
return original_handler(e)
File “/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py”, line 1820, in full_dispatch_request
rv = self.dispatch_request()
File “/var/mycodo-root/env/lib/python3.9/site-packages/flask/app.py”, line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File “/var/mycodo-root/env/lib/python3.9/site-packages/flask_login/utils.py”, line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File “/home/picodo/Mycodo/mycodo/mycodo_flask/routes_admin.py”, line 534, in admin_upgrade
current_latest_major_version = current_latest_release.split(‘.’)[0]
AttributeError: ‘NoneType’ object has no attribute ‘split’

You can fix this issue with the following command:

sudo sed -i 's/v\.\*(\\d\\\.\\d\\\.\\d)/v(\\d+)\\\.(\\d+)\\\.\\d+/g' ~/Mycodo/mycodo/utils/github_release_info.py && sudo service mycodoflask restart

1 Like