error report system : open font default path set to C: #59900

Closed
opened 2018-12-27 16:41:11 +01:00 by Cătălin George Feștilă · 5 comments

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

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

(example: 2.79b release)
(example: 2.80, edbf15d3c0, 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 = bpy.data.objects['Text']
txt.data.body = 'I'
font_definition = bpy.data.fonts.load('default_font.ttf')
txt.data.font = 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...
**System Information** Operating system: Windows 8.1 Graphics card: NVIDIA 740M **Blender Version** Broken: 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> ``` 3. the *reporting error system* report twice one error ``` Error: Unable to pack file, source path 'C:\default_font.ttf' not found ``` 4. 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 = bpy.data.objects['Text'] txt.data.body = 'I' font_definition = bpy.data.fonts.load('default_font.ttf') txt.data.font = 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... ```

This issue was referenced by de14ddf3a1

This issue was referenced by de14ddf3a141cb0e2baff00b06dc7d86d3088916

Added subscriber: @mythcat

Added subscriber: @mythcat

Added subscriber: @brecht

Added subscriber: @brecht
  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.
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.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#59900
No description provided.