04 Jan 2022 07:26 AM - last edited on 18 May 2023 04:11 AM by Michal_Gebacki
I guess this is more a python thingy but I only have this recently when moving to the latest sdk and Python3.8.
Problem is that building a plugin fails with message: Error occured: [Errno 13] Permission denied: 'top_level.txt'
(I will include the entire log with verbose)
I have checked the entire system for top_level.txt files and the permissions on them and they are all ok. I guess that the build process has this file open at the moment it wants to do something with it.
Running it with root (sudo) seems to work, but then all downloaded modules have the wrong privileges which is even more anoying.
I know this is a very specific one, but I hope to find some help or some tricks.
Solved! Go to Solution.
Hi @Bert_VanderHeyd ,
it looks like an issue with python virtual environment. How do you have it installed? Maybe you could try it with the default system-wide python.
I am using venv to be able to switch to 3.8. When I build with 3.6 (system wide python) I get exactly the same error.
I'd try run strace on the plugin_sdk build_plugin and see where and why it fails:
strace -f -o /tmp/build_plugin.txt plugin_sdk build_plugin
Can you share the output here?
Here you go.
Looks like it has to do with the removal of a temp directory.
The reason was very simple... I was running the build from within the directory containing the sources. Just moving one dir up did the trick.
Had a very similar issue with the file "METADATA" instead of "top_level.txt".
In my case, it was that in the directory /opt/dynatrace/remotepluginmodule/plugin_deployment
the directory for the extension was owned by root.
Deleting that directory and building again had no issue.