Stuck at "Update the disk name" when generating disk image

Asked by FluffyBucket

I am unable to create an ISO as it gets stuck at the "Update the disk name" stage. I am using version 2021.01.40

I have tested this on a clean project where nothing is added or changed. My source is an Ubuntu 20.04.1 live image.

The following is the output when running cubic in the terminal, (Only output for the relevant stage)

Update the disk name
  • The existing file will be updated...... /home/marlind/test_cubic/custom-
  • Update disk name....................... #define DISKNAME Ubuntu-Server
                                            20.04.1 2021.01.13 "Custom Focal
  • Update disk note....................... #define DISKNOTE Generated using
                                            Cubic version 2021.01.40 on 13. jan.
                                            2021 kl. 13.55 +0100 based on

 Update the disk information
  • Reformat the time stamp................ 13. jan. 2021 kl. 13.55 +0100
  • Try old time stamp format.............. %x %X
  • Matched the time stamp format?......... No
  • The new time stamp format is........... %Y%m%d

Exception in thread Thread-11:
Traceback (most recent call last):
  File "/usr/share/cubic/pages/", line 730, in update_disk_info
    time_stamp = constructor.reformat_time_stamp(model.project.modify_date, TIME_STAMP_FORMAT_YYYYMMDD)
  File "/usr/share/cubic/utilities/", line 228, in reformat_time_stamp
    time_stamp = time.strftime(new_format, struct_time).strip()
TypeError: Tuple or struct_time argument required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/", line 932, in _bootstrap_inner
  File "/usr/lib/python3.8/", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/cubic/", line 446, in navigate
    result = new_page.enter(action, page) if new_page else None
  File "/usr/share/cubic/pages/", line 170, in enter
    is_error = update_disk_name_and_disk_info()
  File "/usr/share/cubic/pages/", line 626, in update_disk_name_and_disk_info
    is_error = update_disk_info()
  File "/usr/share/cubic/pages/", line 738, in update_disk_info
    logger.log_value('Unable to update the disk information in', file_path)
UnboundLocalError: local variable 'file_path' referenced before assignment

Question information

English Edit question
Cubic Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
FluffyBucket (fluffybucket) said :

After some digging around I think I have found the problem and the solution.

The function "reformat_time_stamp" fails to format the timestamp which looks like "DD. month. YYYY kl. HH.MM +HHMM".
It attempts to parse that date with the format "%x %X" i.e. "DD/MM/YY HH:MM:SS", which will of course fail.
Also form what I understood when examining the code, the timestamp should not look like "DD. month. YYYY kl. HH.MM +HHMM". It appears (to me) that the format comes from the linux filesystem.

The solution was to update the function and have it check additional time formats.
I made the following change to the file, line 211:
        old_formats = (TIME_STAMP_FORMAT, '%d. %b %Y kl. %H.%M %z', '%d. %b. %Y kl. %H.%M %z', )

Note: I added two quite similar formats as for some reason I got different results when parsing the timestamps in the terminal or by cubic.

Revision history for this message
Cubic PPA (cubic-wizard) said :


Thanks for reporting this and also doing the research!
It will save me a lot of time.

Would you be willing to share your locale information, so I can test with your locale?

If so please paste the output of...

    $ locale

Revision history for this message
FluffyBucket (fluffybucket) said :


No problem here is the output of locale:


Revision history for this message
Cubic PPA (cubic-wizard) said :


I've created Bug #1911469 to address this issue.

Revision history for this message
Cubic PPA (cubic-wizard) said :

Fix released in version 2021.01-41.

The date and time format is now explicitly set to "YYYY-MM-DD HH:MM" regardless of locale. HH is in 24 hour format. The create_date in cubic.conf will retain the original format. The modify_date in cubic.conf, and other places where date time is required, will use the new format.

Can you help with this problem?

Provide an answer of your own, or ask FluffyBucket for more information if necessary.

To post a message you must log in.