TypeError: __init__() should return None, not 'NoneType' #49122
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#49122
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
hello,
I'm currently having trouble with appending a boost depended library called dlib.
all my libraries on my system are the same version of blender version 2.77a
this is my code:
this is where I receive the error
I don't know why its giving this error, this should just work. i have spent a lot of time trying to figure out why I'm getting these errors. Maybe its a bug in blender or I'm having a brain fart and its one line of code to get this program running or maybe what I'm trying to do is impossible with blender... i don't know.
my project is using dlibs marker-less tracking system for facial recognition in which I can use to control characters in blender using any camera in real time.
to produce the same errors,
install python 3.5.1 onto your computer and install dlib for python 3.5.1
then append that to blender to integrate those libraries into blender.
cool tip:
also you can install opencv2 to python 3.5 and append that to blender to create a realtime augmented reality in which opencv tracks the head and moves the camera to create the illusion that any screen has 3d depth. I have successfully done this.
thank you for your time,
Changed status to: 'Open'
Added subscriber: @PascalJardin
Added subscriber: @brecht
To be clear, you are getting this error when running the script from inside Blender, but not when running it from the command line with
python3.5
?Added subscriber: @mont29
I really doubt Blender in itself has anything to do with this issue, this is purely low-level python issue, some init func (called by
dlib.shape_predictor(predictor_path)
?) returningNone.__class__
instead ofNone
from what you can guess from error message…@brecht question is indeed first to answer. If your code works from regular python console, then it might be an issue between your system’s python and Blender’s python. To check that, you should try to build blender against your system python. Python version is not enough to ensure binary compatibility of (compiled) modules.
yes, I'm getting this error when I run the script in blender, but when I run it from the command line python 3.5 it works fine without any issues. And I have already tried to compile blender following the directions from the blender website.
compiling Blender using the steps above still produces an error. But the system python dose not generate an error
so, I'm I missing a step for it to use the system python3.5 instead of blender's or what I did above is correct?
if the steps above is not correct to build blender using the system python3.5, how do I build blender with my system python?
thank you for helping me with this
You may want to check that your /opt/lib/ folder has no python directory (that’s where install_deps puts its built libs, there’s no real reason for it to build python on any modern system, but there could be a left-over maybe…).
You can also try to disable all the
WITH_PYTHON_INSTALL
options of CMake config, those are useless on a linux system (and will save you a few Mb of disk space too).Also! Looks like dlib uses boost::python to generate its pybinding code. So it could be some kind of conflict between Blender's boost and dlib's boost libraries maybe (not sure how exactly boost::python works, but knowing how boost loves nasty black magic tricks, would not be surprised generated pybinding still needs to link against some boost libs).
So could be worth checking you do not have any boost lib left over in /opt/lib either.
Besides that, googling your error I found this page, maybe can help you figure out what’s the exact issue?
from your helpful comment, I check the blender I compiled and it did not generate its own python. But it did seemed to generate its own boost. through some playing with compiling blender and going through the folders I believed I have narrowed down the problem to where dlib is not binding correctly to the blender boost like you said. This would explain how I can import dlib into blender with no problems, but when I use one of dibs advance functions it gives me an error. However I have no idea what pybindings I might need to link against to get the boost working. I'm going to contact the creator of dlib and see if he has any ideas on how to get this working.
and I went to the website link you sent me, it helped me by pointing me in the right direction in what I need to do, thank you.
and the /opt/lib/ folder on my computer is completely empty, I have a mac OS X if that matters at all.
Changed status from 'Open' to: 'Archived'
Ah crap, I thought it was linux… Then it means you are using pre-compiled libs from svn repo to build Blender I guess?
What you should do in this case is to build both Blender and dlib with the same boost libraries (which means probably, build Blender with boost you used to build dlib, and not the one from svn libs, you'll have to change the paths for boost libs in Blender's CMake config).
In any case, thanks for the report, but this is definitively not a bug imho, so will close the report now.
well thank you for all your help! Now I know that all I need to do is to alter cmake for blender to use the boost I used to build dlib.
...you don't have to answer this since this is not a bug, but it would be really helpful to me if you can. How do you change the paths for boost libs in Blender's CMake config?
thanks,
Suggest you use cmake-gui (comes with cmake on Mac, afaik), open your build dir in it, and search for Boost entries (setting Boost_DIR to the base path of Blender's boost lib and re-running generate should be enough).
installing dlib using blenders boost produced errors, but I was able to build blender using the boost dlib was built on. But I still get the
I don't know what to do
for my project I need a facial landmark detector that can be intergraded into blender. By any chance, do you know if there is a library that detects facial expressions and is compatible to blender that I can use instead? Because if there is another library out there that can be easily integrated with blender that detects facial landmarks that would be amazing! :)
thanks
Pascal