19 Oct 2018
06:37 AM
- last edited on
18 May 2023
10:41 PM
by
Michal_Gebacki
Hello,
I'm trying to write a OneAgent plugin. What I've done:
The result :
/opt/rh/rh-python35/root/usr/bin/oneagent_build_plugin --no_upload
Arguments=Namespace(no_cert_ver=False, no_restart=False, no_upload=True, source_dir='/tmp/plugin-sdk/examples/demo_oneagent_plugin', target_dir=None, verbose=False)
Starting oneagent_build_plugin
Checking plugin metadata: /tmp/plugin-sdk/examples/demo_oneagent_plugin/plugin.json
Validating plugin.json against schema
Plugin data: Plugin name=custom.python.demo_plugin, version=1.2
Cleaning up previous build information
running bdist_wheel
running build
running build_py
creating build
creating build/lib
copying /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.py -> build/lib
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
copying build/lib/demo_plugin.py -> build/bdist.linux-x86_64/wheel
running install_egg_info
running egg_info
creating /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info
writing /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/PKG-INFO
writing top-level names to /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/top_level.txt
writing dependency_links to /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/dependency_links.txt
writing requirements to /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/requires.txt
writing manifest file '/tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/SOURCES.txt'
reading manifest file '/tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/SOURCES.txt'
writing manifest file '/tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info/SOURCES.txt'
Copying /tmp/plugin-sdk/examples/demo_oneagent_plugin/demo_plugin.egg-info to build/bdist.linux-x86_64/wheel/demo_plugin-1.2-py3.5.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/demo_plugin-1.2.dist-info/WHEEL
creating 'dist/demo_plugin-1.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'demo_plugin.py'
adding 'demo_plugin-1.2.dist-info/METADATA'
adding 'demo_plugin-1.2.dist-info/WHEEL'
adding 'demo_plugin-1.2.dist-info/top_level.txt'
adding 'demo_plugin-1.2.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Leaving directory /tmp/tmpereehe53
Created distribution of the plugin: [('bdist_wheel', '3.5', 'dist/demo_plugin-1.2-py3-none-any.whl')]
Installing plugin to temporary location
Requirement 'dist/demo_plugin-1.2-py3-none-any.whl' looks like a filename, but the file does not exist
Processing ./dist/demo_plugin-1.2-py3-none-any.whl
Exception:
Traceback (most recent call last):
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/utils/__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/pip/utils/__init__.py", line 482, in unzip_file
zipfp = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/plugin-sdk/examples/demo_oneagent_plugin/dist/demo_plugin-1.2-py3-none-any.whl'
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Error occured: Failed to install the plugin into temporary location
Have I done something wrong?
JP
Solved! Go to Solution.
The issue is known and has already beeen adressed since 155. Additional question - did you use build_plugin command on this particular machine before? Did it work as expected?
This is the first time I use the build_plugin command on this machine.
I'll let you know the results of my tests when I'll get the 155 (is it already out ?).
Regards,
JP
Not at the moment. It's should be available at the beginning of the November.
about 6th of November
Hi, @Radoslaw S. I hope you are fine. Was the 155 released? I facing the same FileNotFoundIssue after pip downgrade to 9.0.3
Regards,
Pablo Silva