Closed pabpazjim closed 2 years ago
I am also obtaining the following error when using the framework from the command line with "hug":
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "E:\workspaces\famapy-ws\env\Scripts\hug.exe\__main__.py", line 7, in <module>
File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\interface.py", line 650, in __call__
raise exception
File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\interface.py", line 646, in __call__
result = self.output(self.interface(**pass_to_function), context)
File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\interface.py", line 129, in __call__
return __hug_internal_self._function(*args, **kwargs)
File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\development_runner.py", line 65, in hug
api_module = importlib.machinery.SourceFileLoader(file.split(".")[0], file).load_module()
File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 969, in load_module
File "<frozen importlib._bootstrap_external>", line 794, in load_module
File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 786, in exec_module
File "<frozen importlib._bootstrap_external>", line 922, in get_code
File "<frozen importlib._bootstrap_external>", line 979, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'famapy/endpoint/diverso-lab.py'
I am also obtaining the following error when using the framework from the command line with "hug":
Traceback (most recent call last): File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "E:\workspaces\famapy-ws\env\Scripts\hug.exe\__main__.py", line 7, in <module> File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\interface.py", line 650, in __call__ raise exception File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\interface.py", line 646, in __call__ result = self.output(self.interface(**pass_to_function), context) File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\interface.py", line 129, in __call__ return __hug_internal_self._function(*args, **kwargs) File "e:\workspaces\famapy-ws\env\lib\site-packages\hug\development_runner.py", line 65, in hug api_module = importlib.machinery.SourceFileLoader(file.split(".")[0], file).load_module() File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper File "<frozen importlib._bootstrap_external>", line 969, in load_module File "<frozen importlib._bootstrap_external>", line 794, in load_module File "<frozen importlib._bootstrap>", line 274, in _load_module_shim File "<frozen importlib._bootstrap>", line 711, in _load File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 786, in exec_module File "<frozen importlib._bootstrap_external>", line 922, in get_code File "<frozen importlib._bootstrap_external>", line 979, in get_data FileNotFoundError: [Errno 2] No such file or directory: 'famapy/endpoint/diverso-lab.py'
@jmhorcas thanks, I also got this error but forgot to mention it.
It is solved by cloning core and CDing to it, as long as you have the plugins installed. I'll update the documentation to tell users to do so.
hug -f famapy/endpoint/diverso-lab.py -c use_operation_from_file ValidProduct test.xml
would return False for any model, as there is no clear way to input the product to check. It does not even return a missing parameter error.AttributeError: 'NoneType' object has no attribute 'get_extension
on discover.py:184