Reiner Johannes Mayers
unread,Nov 6, 2015, 8:43:10 AM11/6/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to coolprop-users
Hi guys,
I try to run the Coolprop/Refprop link inside of a django (1.8.x) web
application
on linux. Just using CoolProp without Refprop works fine. In the exact
same Python
environment the Refprop link works without problem. Unless I invoke the
command
from the django manager ... python manage.py refprop_km
Any experiance with this?
regards
Reiner
$DjangoAppDir/management/commands/refprop_km.py :
#### code
from django.core.management.base import BaseCommand, CommandError
import CoolProp.CoolProp as CP
class Command(BaseCommand):
help = 'imports data for mixtures from refprop to the tables'
def handle(self, *args, **options):
#
ref='REFPROP::R134a'
evap=CP.PropsSI('T','P',101325,'Q',0,ref)-273.15
####/code
Output :
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/home/mayers/PyEnv/kformaug/lib/python3.4/site-packages/django/core/management/__init__.py",
line 338, in execute_from_command_line
utility.execute()
File
"/home/mayers/PyEnv/kformaug/lib/python3.4/site-packages/django/core/management/__init__.py",
line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/home/mayers/PyEnv/kformaug/lib/python3.4/site-packages/django/core/management/base.py",
line 393, in run_from_argv
self.execute(*args, **cmd_options)
File
"/home/mayers/PyEnv/kformaug/lib/python3.4/site-packages/django/core/management/base.py",
line 444, in execute
output = self.handle(*args, **options)
File
"/home/mayers/git/kformaug/kform/stammdat/management/commands/refprop_km.py",
line 20, in handle
evap=CP.PropsSI('T','P',101325,'Q',0,ref)-273.15
File "CoolProp/CoolProp.pyx", line 278, in CoolProp.CoolProp.PropsSI
(CoolProp/CoolProp.cpp:30608)
File "CoolProp/CoolProp.pyx", line 358, in CoolProp.CoolProp.PropsSI
(CoolProp/CoolProp.cpp:30393)
File "CoolProp/CoolProp.pyx", line 247, in
CoolProp.CoolProp.__Props_err2 (CoolProp/CoolProp.cpp:28598)
ValueError: Initialize failed for backend: "REFPROP", fluid: "R134a"
fractions "[ 1,0000000000 ]"; error: Could not load these fluids: R134a
: PropsSI("T","P",101325,"Q",0,"REFPROP::R134a")
Comment:
There is no File CoolProp.pyx