title: Azure Functions - Python int too large to convert to C long (Azure EA API)
body: <p>I'm running a data ingestion tool that is fetching data from an API. Its returning about 35k objects that are stored in a list, then later uses SQLAlchemy to insert the object into the DB. This runs fine on Linux/Mac, but errors on Windows. I have seem other posts explaining the issue, but I can't find a resolution. Do I need to transform the data from the API to a different data type before I send it to SQL? If so, how and what type?</p>
  
  <p>I am using 64bit python on Azure, using an App service plan with 8gb. </p>
  
  <pre><code>18-01-24T19:06:07.066 Exception while executing function: Functions.main. Microsoft.Azure.WebJobs.Script: OverflowError: Python int too large to convert to C long
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "D:\Repos\azure-python-siteextensions\source_packages\python.3.6.1\tools\Lib\encodings\utf_16_le.py", line 16, in decode
  SystemError: &lt;built-in function utf_16_le_decode&gt; returned a result with an error set
  
  The above exception was the direct cause of the following exception:
  
  SystemError: decoding with 'utf-16le' codec failed (SystemError: &lt;built-in function utf_16_le_decode&gt; returned a result with an error set)
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "D:\home\site\wwwroot\main\run.py", line 72, in &lt;module&gt;
      result_prox = connection.execute(ins_stmt, usage_data)
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\engine\base.py", line 948, in execute
      return meth(self, multiparams, params)
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\sql\elements.py", line 269, in _execute_on_connection
      return connection._execute_clauseelement(self, multiparams, params)
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\engine\base.py", line 1060, in _execute_clauseelement
      compiled_sql, distilled_params
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\engine\base.py", line 1200, in _execute_context
      context)
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\engine\base.py", line 1416, in _handle_dbapi_exception
      util.reraise(*exc_info)
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\util\compat.py", line 187, in reraise
      raise value
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\engine\base.py", line 1170, in _execute_context
      context)
    File "D:\home\site\tools\lib\site-packages\sqlalchemy\engine\default.py", line 504, in do_executemany
      cursor.executemany(statement, parameters)
  SystemError: &lt;class 'pyodbc.Error'&gt; returned a result with an error set
  </code></pre>