soap117 / DeepRule

BSD 3-Clause "New" or "Revised" License
125 stars 42 forks source link

ImportError: DLL load failed while importing top_pool: %1 is not a valid Win32 application. #27

Closed harrypotter30022003 closed 1 year ago

harrypotter30022003 commented 1 year ago

Hello, I tried to run this for my personal research but it failed. can someone please guide me to fix? Thank you so much

(DeepRule) C:\Users\ASUS\FastAI\DeepRule>python manage.py runserver 8800 Watching for file changes with StatReloader Performing system checks...

Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(args, **kwargs) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\core\management\commands\runserver.py", line 134, in inner_run self.check(display_num_errors=True) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\core\management\base.py", line 475, in check all_issues = checks.run_checks( File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\core\checks\registry.py", line 88, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config return check_resolver(resolver) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver return check_method() File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\urls\resolvers.py", line 494, in check for pattern in self.url_patterns: File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\utils\functional.py", line 57, in get res = instance.dict[self.name] = self.func(instance) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\utils\functional.py", line 57, in get res = instance.dict[self.name] = self.func(instance) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module return import_module(self.urlconf_name) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\ASUS\FastAI\DeepRule\server_match\urls.py", line 18, in from . import view File "C:\Users\ASUS\FastAI\DeepRule\server_match\view.py", line 2, in from test_pipeline import test File "C:\Users\ASUS\FastAI\DeepRule\test_pipeline.py", line 13, in from nnet.py_factory import NetworkFactory File "C:\Users\ASUS\FastAI\DeepRule\nnet\py_factory.py", line 7, in from models.py_utils.data_parallel import DataParallel File "C:\Users\ASUS\FastAI\DeepRule\models\py_utils__init.py", line 6, in from ._cpools import TopPool, BottomPool, LeftPool, RightPool File "C:\Users\ASUS\FastAI\DeepRule\models\py_utils_cpools__init__.py", line 5, in from models.py_utils._cpools import top_pool, bottom_pool, left_pool, right_pool File "C:\Users\ASUS\FastAI\DeepRule\models\py_utils_cpools\top_pool.py", line 7, in bootstrap() File "C:\Users\ASUS\FastAI\DeepRule\models\py_utils_cpools\top_pool.py", line 6, in bootstrap__ imp.load_dynamic(name,file__) File "C:\Users\ASUS\anaconda3\envs\DeepRule\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed while importing top_pool: %1 is not a valid Win32 application.

nigelhenry commented 1 year ago

Did you get this to work? I believe you need to replace the file in imp.load_dynamic(name,file) from the .so files to the .pyd files