I have a Django Script that uses sqlanydb, that gives MemoryErorr. I cannot figure out what's wrong. I have another Windows Server running the exact same version of SQL Anywhere and that works fine.
Please help!
Performing system checks...
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000000003DFC048>
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
self.check(display_num_errors=True)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\core\management\base.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\core\management\base.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\core\checks\registry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\core\checks\urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\core\checks\urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\utils\functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\urls\resolvers.py", line 536, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\utils\functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\django\urls\resolvers.py", line 529, in urlconf_module
return import_module(self.urlconf_name)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\SumoPinRisk\Sumo\urls.py", line 18, in <module>
from PinRisk import views
File "C:\SumoPinRisk\PinRisk\views.py", line 4, in <module>
from . import forms
File "C:\SumoPinRisk\PinRisk\forms.py", line 6, in <module>
class RiskParamForm(forms.Form):
File "C:\SumoPinRisk\PinRisk\forms.py", line 9, in RiskParamForm
choices=[(tdr,tdr) for tdr in Trader.all()]
File "C:\SumoPinRisk\PinRisk\models.py", line 86, in all
conn = sqlanydb.connect(uid='dba', pwd='dba', eng='AQTOR')
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 522, in connect
return Connection(args, kwargs)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 571, in __init__
char_set = cur.fetchone()[0]
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 820, in fetchone
rows = self.fetchmany(size=1)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 817, in fetchmany
return [row for i,row in zip(range(size), self.rows())]
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 817, in <listcomp>
return [row for i,row in zip(range(size), self.rows())]
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 811, in rows
yield tuple(self.converter.gen(v3list(list(self.values()))))
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 803, in values
yield (self.valueof)(value)
File "C:\ProgramData\Anaconda3\envs\pinrisk\lib\site-packages\sqlanydb.py", line 390, in valueof
return data.buffer[:data.length.contents.value]
MemoryError
I have a Django Script that uses sqlanydb, that gives MemoryErorr. I cannot figure out what's wrong. I have another Windows Server running the exact same version of SQL Anywhere and that works fine.
Please help!