Page MenuHome

error report system : open font default path set to C:
Closed, ResolvedPublic


System Information
Operating system: Windows 8.1
Graphics card: NVIDIA 740M

Blender Version
version: 2.80 (sub 37), branch: blender2.8, commit date: 2018-12-14 00:55, hash: f13a4b2f123, type: Release

(example: 2.79b release)
(example: 2.80, edbf15d3c044, blender2.8, 2018-11-28, as found on the splash screen)
Worked: (optional)

Short description of error

  1. the default path for an open font is set to C: disk and users need to set the full path (this will solve the problem)
  2. the reporting error system expect to have it in to blend folder area:
font_script.blend\Text", line 6, in <module>
  1. the reporting error system report twice one error
Error: Unable to pack file, source path 'C:\default_font.ttf' not found
  1. even is a mirror aspect that will need to be fixed into the future

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).
run the script:

import bpy

bpy.ops.object.text_add(location=(0, 0, 0), rotation=(0, 0, 0))
txt =['Text'] = 'I'
font_definition ='default_font.ttf') = font_definition

the error:

Error: Unable to pack file, source path 'C:\default_font.ttf' not found
Error: Unable to pack file, source path 'C:\default_font.ttf' not found
Traceback (most recent call last):
  File "C:\00000000000\font_script.blend\Text", line 6, in <module>
RuntimeError: Error: Cannot read 'default_font.ttf': No such file or directory

Error: Python script fail, look in the console for now...

Event Timeline

  1. If no absolute file path is given, it will use a path relative to the current working directory. This is standard behavior for API functions dealing with file paths.
  2. This is a path to the script being executed, it has no relation to the path of the font.
  3. Indeed it should only report the error once.