Can't access blob storage via azure-storage package in Python WebJob
<p>I am trying to read/write from blob storage using a Python WebJob on an Azure App Service. My App Service's requirements.txt file includes the azure-storage package name: the package is successfully installed via pip during App Service deployment. However, when I include the following in my WebJob's run.py file:</p>

<pre><code>import sys
sys.path.append('D:\\home\\site\\wwwroot\\env\\Lib\\site-packages')
from azure.storage.blob import BlockBlobService
</code></pre>

<p>...I get the following error message at runtime:</p>

<pre><code>[09/27/2016 17:51:09 &gt; 775106: SYS INFO] Status changed to Initializing
[09/27/2016 17:51:09 &gt; 775106: SYS INFO] Run script 'run.py' with script host - 'PythonScriptHost'
[09/27/2016 17:51:09 &gt; 775106: SYS INFO] Status changed to Running
[09/27/2016 17:51:10 &gt; 775106: ERR ] Traceback (most recent call last):
[09/27/2016 17:51:10 &gt; 775106: ERR ]   File "run.py", line 11, in &lt;module&gt;
[09/27/2016 17:51:10 &gt; 775106: ERR ]     from azure.storage.blob import BlockBlobService
[09/27/2016 17:51:10 &gt; 775106: ERR ]   File "D:\home\site\wwwroot\env\Lib\site-packages\azure\storage\blob\__init__.py", line 15, in &lt;module&gt;
[09/27/2016 17:51:10 &gt; 775106: ERR ]     from .models import (
[09/27/2016 17:51:10 &gt; 775106: ERR ]   File "D:\home\site\wwwroot\env\Lib\site-packages\azure\storage\blob\models.py", line 15, in &lt;module&gt;
[09/27/2016 17:51:10 &gt; 775106: ERR ]     from .._common_conversion import _to_str
[09/27/2016 17:51:10 &gt; 775106: ERR ]   File "D:\home\site\wwwroot\env\Lib\site-packages\azure\storage\_common_conversion.py", line 22, in &lt;module&gt;
[09/27/2016 17:51:10 &gt; 775106: ERR ]     from .models import (
[09/27/2016 17:51:10 &gt; 775106: ERR ]   File "D:\home\site\wwwroot\env\Lib\site-packages\azure\storage\models.py", line 23, in &lt;module&gt;
[09/27/2016 17:51:10 &gt; 775106: ERR ]     from ._error import (
[09/27/2016 17:51:10 &gt; 775106: ERR ]   File "D:\home\site\wwwroot\env\Lib\site-packages\azure\storage\_error.py", line 15, in &lt;module&gt;
[09/27/2016 17:51:10 &gt; 775106: ERR ]     from ._common_conversion import _to_str
[09/27/2016 17:51:10 &gt; 775106: ERR ] ImportError: cannot import name '_to_str'
[09/27/2016 17:51:10 &gt; 775106: SYS INFO] Status changed to Failed
[09/27/2016 17:51:10 &gt; 775106: SYS ERR ] Job failed due to exit code 1
</code></pre>

<p>FWIW, several other packages were loaded properly using the same approach. Can anyone suggest a method to get the azure-storage package working in Python Azure WebJobs?</p>

<p>Looks like six module is missing. This issue is also tracked via this thread: <a href="https://github.com/Azure/azure-storage-python/issues/22" rel="nofollow">https://github.com/Azure/azure-storage-python/issues/22</a>. You can fix issue by adding  the six module to requirements.txt or manually installing six module by pip install six.  </p>

python azure windows-azure-storage azure-storage-blobs azure-webjobs