Unable to import PDB file using PDB/XYZ addon #94008
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#94008
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-5.4.0-91-generic-x86_64-with-glibc2.31 #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Graphics card:
Blender Version
Broken: io_mesh_atomic addon in blender 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: f1cca3055776, type: release
Python version: 3.9.7 (default, Oct 11 2021, 10:06:01) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)]
Short description of error
Importing a PDB file failes because of the use of a not assigned variable in the python script.
Exact steps for others to reproduce the error
When trying to import a PDB file generated by OpenBabel, the following error arises:
{F12736494, size=full}
The source code uses the variable
line
that is actually a local loop variable in the previous block as you can see:{F12736503, size=full}
Added subscriber: @dadel
Added subscriber: @PratikPB2123
Changed status from 'Needs Triage' to: 'Confirmed'
Hi, thanks for the report. Seems broken from the very first revision.
Can confirm. (Will check if I can fix this)
I import the exported file from blender and still it appeared (Which is expected because line is used away from the for loop scope)
Added subscriber: @Blendphys
Changing the scope does not fix importing issue here (may be I am doing some mistake).
Hi @Blendphys, can you look at this?
Hi all.
It seems that there is an issue with the file pointer 'filepath_pdb_p' since 'line' has no value from the beginning of the loop.
Hmm, I have Blender version 3.0 on a different computer and will deal with this on Monday. I keep you informed. Please, be patient ... ;-)
PS: Please, can you send the PDB file which you were using? Thanks.
Dear Dadel and Patrik.
I tested a dozen of PDB and some XYZ files: there is no problem, I can import all structures.
To proceed, I would like to have your PDB files, Dadel and Pratik. With this, I can then check what is going on. Below, you find some specifications of the system, which I'm using.
.
Blender 3.1.0 Alpha System Information
Blender:
version: 3.1.0 Alpha, branch: master, commit date: 2022-01-03 13:46, hash: a3e634d4d7a3, type: Release
build date: 2022-01-03, 14:30:42
platform: 'Linux-5.4.0-91-generic-x86_64-with-glibc2.27'
Python:
version: 3.9.7 (default, Oct 11 2021, 10:06:01) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)]
file system encoding: utf-8:surrogateescape
Python (External Binary):
binary path: '/home/cle/blender-git/build_linux/bin/3.1/python/bin/python3.9'
version: Python 3.9.7
GPU:
renderer: 'Quadro RTX 4000/PCIe/SSE2'
vendor: 'NVIDIA Corporation'
version: '4.5.0 NVIDIA 460.91.03'
Cycles:
CPU device capabilities: SSE2 SSE3 SSE41 AVX AVX2
CUDA device capabilities:
Quadro RTX 4000
Changed status from 'Confirmed' to: 'Needs User Info'
Bit strange. I was getting traceback earlier. (with same error message:
local variable line referenced before assignment
)Now I am seeing different error (I will submit a separate report for it)
Hi @dadel , can you please provide a broken .pdb file?
Patrik, I do not wonder that things do not work considering the other report (https://developer.blender.org/T94292): the user should be in the 'Object' and not in the 'Edit' mode!
Let's hope that we get the PDB file ... .
Added subscriber: @scurest
I'm pretty sure this can only happen for an empty .pdb file. Otherwise the
for line in filepath_pdb_p
loop would have been entered, so line would be assigned.Small note: I just changed the code such that the user is now always in the 'OBJECT' mode.
See changes: link
PS: Shall we close the thread @PratikPB2123 and @dadel ?
Changed status from 'Needs User Info' to: 'Archived'
@Blendphys , yes. Will close as we do not have sufficient information (test file).
@scurest , on importing empty pdb file I get ZeroDivisionError (not the same as said in this report).
@dadel feel free to comment or reopen the ticket if issue persists with recent fixes. Be sure to provide sample file to test the issue. Thanks for the report!