04 Jan 2022 03:26 PM - last edited on 18 May 2023 12:11 PM by Michal_Gebacki
Hey Community,
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.
Thanks.
Solved! Go to Solution.
04 Jan 2022 03:30 PM
See attached log.
04 Jan 2022 09:41 PM
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.
Julius
05 Jan 2022 08:06 AM
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.
05 Jan 2022 08:53 PM
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?
06 Jan 2022 10:25 AM
Here you go.
Looks like it has to do with the removal of a temp directory.
rmdir("/tmp/tmppc7q0iw_")
11 Feb 2022 02:34 PM
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.
11 Jun 2022 08:48 PM
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.