[SOLVED] Invalid literal for float()

Brief description of the problem

  • unable to create initial admin user

Detailed step by step instructions to reproduce the problem

  • install from Rockstor-3.8.15.iso
  • login as root
  • change locale to e.g. de_DE.utf8
  • open Web-UI
  • try to create initial admin user

Error Traceback provided on the Web-UI

Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 272, in post
return self._update_disk_state()
File “/opt/rockstor/eggs/Django-1.6.11-py2.7.egg/django/db/transaction.py”, line 371, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 62, in _update_disk_state
disks = scan_disks(settings.MIN_DISK_SIZE)
File “/opt/rockstor/src/rockstor/system/osi.py”, line 318, in scan_disks
dmap[‘SIZE’] = int(float(size_str[:-1]) * 1024 * 1024)
ValueError: invalid literal for float(): 28,3

Seems like a localisation issue with the separator ‘,’ used instead of ‘.’ when switching to a German locale.

Just thought I’d report this issue as I didn’t notice it with version 3.8.14.

Hi @Motte,
my suggestion: have initial setup with en_us locale, then move to de_de


@Flyer, that’s exactly what I did to solve it on my end.


1 Like