2
$\begingroup$

I'm using requests in my addon. On OSX it seems to work fine but on windows I'm getting this bizarre message box on startup:

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: E:\Blender Foundation\blender.exe

R6034

An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.


---------------------------
OK   
---------------------------

Blender does run but I can't seem to get rid of this error. I can't see anything in the requests code that would even trigger this issue.

$\endgroup$
2
  • $\begingroup$ Is the requests library a wrapper for a C/C++ library? $\endgroup$
    – CharlesL
    Commented Mar 10, 2014 at 19:11
  • $\begingroup$ No. It's purely python as far as I can tell. $\endgroup$
    – Ben L
    Commented Mar 10, 2014 at 19:55

2 Answers 2

5
$\begingroup$

This is a very unfortunate glitch, at the moment has no nice solution. Both Blender and Python devs are aware of it.

The problem is with importing uuid (which requests happens to use).

For now, you can workaround this by temporarily disabling ctypes with the uuid module.

See:

from: addons/io_online_sketchfab/__init__.py

# uuid module causes an error messagebox on windows.
#
# using a dirty workaround to preload uuid without ctypes,
# until blender gets compiled with vs2013
def uuid_workaround():
    import platform
    if platform.system() == "Windows":
        import ctypes
        CDLL = ctypes.CDLL
        ctypes.CDLL = None
        import uuid
        ctypes.CDLL = CDLL

uuid_workaround()

# now import a module which uses 'uuid'
import requests

We'll likely be updating to vc2013 for Blender 2.71, I'm not sure if this resolves the issue though, this needs some further investigation from an ms-windows developer.

$\endgroup$
1
  • $\begingroup$ I experience a similar issue with Sphinx docs. $\endgroup$
    – neomonkeus
    Commented Mar 11, 2014 at 9:32
0
$\begingroup$

Firstly, (though it may not seem like it at first), this is primarily a programming question, so you might have better luck on StackOverflow.

That being said, I don't want to leave you twisting in the wind.

According to my research, this has something to do with Microsoft manifest files that are normally generated by Visual Studio. When they are not present or otherwise faulty they cause runtime error R6034.

What this seems to suggest to me is that there is something wrong with your Python distro, or you haven't instructed VS to include manifest files in your Windows distribution... or they're in the wrong place... or something else...

That being said, I got most of these answers literally by Googling "R6034," so

  • there's no guarantee they're correct ;-)
  • it seems like there's plenty of info out there to help get you the rest of the way to the solution.

Hope that helps!

$\endgroup$
1
  • $\begingroup$ I see it more as a setup question. It's so odd as requests doesn't have any c extensions. I've been googling for a week with no avail. $\endgroup$
    – Ben L
    Commented Mar 10, 2014 at 19:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .