Ubuntu 16.04 fopen (…) failed with Python 3.5.2 [on hold]











up vote
-1
down vote

favorite












I am trying to run a Python script which is accessing a file graph.xml of an application (The Open Racing Car Simulator, short TORCS) stored inside /home/username/.torcs/config.



The file exists and seems to be readable (simple xml-file). I think the problem might be that the folder is invisible because of the . and hence my script does not recognize the file. Is my guess correct?



Does anyone know how to allow the Python script (or in general allow any application to access this folder)?



Edit: Content of graph.xml:



<?xml version="1.0" encoding="UTF-8"?>
<!--
file : graph.xml
created : Sun Dec 2 11:58:59 CET 2001
copyright : (C) 2001 by Eric Espi�
email : Eric.Espie@torcs.org
version : $Id: graph.xml,v 1.11 2004/11/26 15:37:47 olethros Exp $
-->

<!-- This program is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->

<!DOCTYPE params SYSTEM "../../../libs/tgf/params.dtd">

<params name="graph" type="param" mode="mw">
<section name="Graphic">
<attnum name="smoke value" val="300"/>
<attnum name="smoke interval" val="0.01"/>
<attnum name="smoke duration" val="2.0"/>

<attnum name="skid value" val="20"/>
<attnum name="skid length" val="300"/>
<attnum name="skid interval" val="0.05"/>

<attnum name="fov factor" val="1.0"/>
</section>

<section name="Playable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="600"/>
<attnum name="Front Level Group 1" val="400"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="700"/>
<attnum name="Rear Level Group 1" val="500"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="150"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="200"/>
<attnum name="Front Level Map 3" val="100"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="200"/>
<attnum name="Rear Level Map 3" val="100"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>

<section name="UnPlayable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="400"/>
<attnum name="Front Level Group 1" val="350"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="400"/>
<attnum name="Rear Level Group 1" val="350"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="200"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="250"/>
<attnum name="Front Level Map 3" val="200"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="250"/>
<attnum name="Rear Level Map 3" val="200"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>


<section name="TV Director View">
<attnum name="change camera interval" val="30"/>
<attnum name="event interval" val="5"/>
<attnum name="proximity threshold" val="25.0"/>
</section>


<section name="Display Mode">
<section name="Player">
<attnum name="camera" val="0"/>
<attnum name="camera head list" val="0"/>
</section>
</section>

</params>









share|improve this question















put on hold as off-topic by muru, karel, Eric Carvalho, wjandrea, guntbert Dec 12 at 22:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, karel, Eric Carvalho

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    I just created a python script to read a file from on a hidden directory and it worked fine. What errors are you getting, can you do cat on the file from terminal?
    – Aaron Obeng
    Dec 1 at 16:21










  • What exactly do you mean by cat on the file? Using cat on the file just printed out its content. I added the content to the question.
    – MrYouMath
    Dec 2 at 14:40










  • Please make an MCVE - for example start with a script that just opens and closes the file. If that doesn't help, post the full traceback, cause it's impossible to say what the problem is without the actual error message.
    – wjandrea
    Dec 4 at 21:54

















up vote
-1
down vote

favorite












I am trying to run a Python script which is accessing a file graph.xml of an application (The Open Racing Car Simulator, short TORCS) stored inside /home/username/.torcs/config.



The file exists and seems to be readable (simple xml-file). I think the problem might be that the folder is invisible because of the . and hence my script does not recognize the file. Is my guess correct?



Does anyone know how to allow the Python script (or in general allow any application to access this folder)?



Edit: Content of graph.xml:



<?xml version="1.0" encoding="UTF-8"?>
<!--
file : graph.xml
created : Sun Dec 2 11:58:59 CET 2001
copyright : (C) 2001 by Eric Espi�
email : Eric.Espie@torcs.org
version : $Id: graph.xml,v 1.11 2004/11/26 15:37:47 olethros Exp $
-->

<!-- This program is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->

<!DOCTYPE params SYSTEM "../../../libs/tgf/params.dtd">

<params name="graph" type="param" mode="mw">
<section name="Graphic">
<attnum name="smoke value" val="300"/>
<attnum name="smoke interval" val="0.01"/>
<attnum name="smoke duration" val="2.0"/>

<attnum name="skid value" val="20"/>
<attnum name="skid length" val="300"/>
<attnum name="skid interval" val="0.05"/>

<attnum name="fov factor" val="1.0"/>
</section>

<section name="Playable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="600"/>
<attnum name="Front Level Group 1" val="400"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="700"/>
<attnum name="Rear Level Group 1" val="500"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="150"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="200"/>
<attnum name="Front Level Map 3" val="100"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="200"/>
<attnum name="Rear Level Map 3" val="100"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>

<section name="UnPlayable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="400"/>
<attnum name="Front Level Group 1" val="350"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="400"/>
<attnum name="Rear Level Group 1" val="350"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="200"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="250"/>
<attnum name="Front Level Map 3" val="200"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="250"/>
<attnum name="Rear Level Map 3" val="200"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>


<section name="TV Director View">
<attnum name="change camera interval" val="30"/>
<attnum name="event interval" val="5"/>
<attnum name="proximity threshold" val="25.0"/>
</section>


<section name="Display Mode">
<section name="Player">
<attnum name="camera" val="0"/>
<attnum name="camera head list" val="0"/>
</section>
</section>

</params>









share|improve this question















put on hold as off-topic by muru, karel, Eric Carvalho, wjandrea, guntbert Dec 12 at 22:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, karel, Eric Carvalho

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    I just created a python script to read a file from on a hidden directory and it worked fine. What errors are you getting, can you do cat on the file from terminal?
    – Aaron Obeng
    Dec 1 at 16:21










  • What exactly do you mean by cat on the file? Using cat on the file just printed out its content. I added the content to the question.
    – MrYouMath
    Dec 2 at 14:40










  • Please make an MCVE - for example start with a script that just opens and closes the file. If that doesn't help, post the full traceback, cause it's impossible to say what the problem is without the actual error message.
    – wjandrea
    Dec 4 at 21:54















up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am trying to run a Python script which is accessing a file graph.xml of an application (The Open Racing Car Simulator, short TORCS) stored inside /home/username/.torcs/config.



The file exists and seems to be readable (simple xml-file). I think the problem might be that the folder is invisible because of the . and hence my script does not recognize the file. Is my guess correct?



Does anyone know how to allow the Python script (or in general allow any application to access this folder)?



Edit: Content of graph.xml:



<?xml version="1.0" encoding="UTF-8"?>
<!--
file : graph.xml
created : Sun Dec 2 11:58:59 CET 2001
copyright : (C) 2001 by Eric Espi�
email : Eric.Espie@torcs.org
version : $Id: graph.xml,v 1.11 2004/11/26 15:37:47 olethros Exp $
-->

<!-- This program is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->

<!DOCTYPE params SYSTEM "../../../libs/tgf/params.dtd">

<params name="graph" type="param" mode="mw">
<section name="Graphic">
<attnum name="smoke value" val="300"/>
<attnum name="smoke interval" val="0.01"/>
<attnum name="smoke duration" val="2.0"/>

<attnum name="skid value" val="20"/>
<attnum name="skid length" val="300"/>
<attnum name="skid interval" val="0.05"/>

<attnum name="fov factor" val="1.0"/>
</section>

<section name="Playable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="600"/>
<attnum name="Front Level Group 1" val="400"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="700"/>
<attnum name="Rear Level Group 1" val="500"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="150"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="200"/>
<attnum name="Front Level Map 3" val="100"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="200"/>
<attnum name="Rear Level Map 3" val="100"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>

<section name="UnPlayable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="400"/>
<attnum name="Front Level Group 1" val="350"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="400"/>
<attnum name="Rear Level Group 1" val="350"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="200"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="250"/>
<attnum name="Front Level Map 3" val="200"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="250"/>
<attnum name="Rear Level Map 3" val="200"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>


<section name="TV Director View">
<attnum name="change camera interval" val="30"/>
<attnum name="event interval" val="5"/>
<attnum name="proximity threshold" val="25.0"/>
</section>


<section name="Display Mode">
<section name="Player">
<attnum name="camera" val="0"/>
<attnum name="camera head list" val="0"/>
</section>
</section>

</params>









share|improve this question















I am trying to run a Python script which is accessing a file graph.xml of an application (The Open Racing Car Simulator, short TORCS) stored inside /home/username/.torcs/config.



The file exists and seems to be readable (simple xml-file). I think the problem might be that the folder is invisible because of the . and hence my script does not recognize the file. Is my guess correct?



Does anyone know how to allow the Python script (or in general allow any application to access this folder)?



Edit: Content of graph.xml:



<?xml version="1.0" encoding="UTF-8"?>
<!--
file : graph.xml
created : Sun Dec 2 11:58:59 CET 2001
copyright : (C) 2001 by Eric Espi�
email : Eric.Espie@torcs.org
version : $Id: graph.xml,v 1.11 2004/11/26 15:37:47 olethros Exp $
-->

<!-- This program is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->

<!DOCTYPE params SYSTEM "../../../libs/tgf/params.dtd">

<params name="graph" type="param" mode="mw">
<section name="Graphic">
<attnum name="smoke value" val="300"/>
<attnum name="smoke interval" val="0.01"/>
<attnum name="smoke duration" val="2.0"/>

<attnum name="skid value" val="20"/>
<attnum name="skid length" val="300"/>
<attnum name="skid interval" val="0.05"/>

<attnum name="fov factor" val="1.0"/>
</section>

<section name="Playable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="600"/>
<attnum name="Front Level Group 1" val="400"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="700"/>
<attnum name="Rear Level Group 1" val="500"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="150"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="200"/>
<attnum name="Front Level Map 3" val="100"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="200"/>
<attnum name="Rear Level Map 3" val="100"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>

<section name="UnPlayable Cameras Distance of Views">
<attnum name="Front Level Group Global" val="400"/>
<attnum name="Front Level Group 1" val="350"/>
<attnum name="Front Level Group 2" val="300"/>
<attnum name="Front Level Group 3" val="200"/>

<attnum name="Rear Level Group Global" val="400"/>
<attnum name="Rear Level Group 1" val="350"/>
<attnum name="Rear Level Group 2" val="300"/>
<attnum name="Rear Level Group 3" val="200"/>

<attnum name="Front Level Map 1" val="300"/>
<attnum name="Front Level Map 2" val="250"/>
<attnum name="Front Level Map 3" val="200"/>

<attnum name="Rear Level Map 1" val="300"/>
<attnum name="Rear Level Map 2" val="250"/>
<attnum name="Rear Level Map 3" val="200"/>

<attnum name="Level Factor" val="1.0"/>
<attnum name="Map Factor" val="1.0"/>
</section>


<section name="TV Director View">
<attnum name="change camera interval" val="30"/>
<attnum name="event interval" val="5"/>
<attnum name="proximity threshold" val="25.0"/>
</section>


<section name="Display Mode">
<section name="Player">
<attnum name="camera" val="0"/>
<attnum name="camera head list" val="0"/>
</section>
</section>

</params>






16.04 python3 restricted-access






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 2 at 14:40

























asked Dec 1 at 15:44









MrYouMath

993




993




put on hold as off-topic by muru, karel, Eric Carvalho, wjandrea, guntbert Dec 12 at 22:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, karel, Eric Carvalho

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by muru, karel, Eric Carvalho, wjandrea, guntbert Dec 12 at 22:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – muru, karel, Eric Carvalho

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 2




    I just created a python script to read a file from on a hidden directory and it worked fine. What errors are you getting, can you do cat on the file from terminal?
    – Aaron Obeng
    Dec 1 at 16:21










  • What exactly do you mean by cat on the file? Using cat on the file just printed out its content. I added the content to the question.
    – MrYouMath
    Dec 2 at 14:40










  • Please make an MCVE - for example start with a script that just opens and closes the file. If that doesn't help, post the full traceback, cause it's impossible to say what the problem is without the actual error message.
    – wjandrea
    Dec 4 at 21:54
















  • 2




    I just created a python script to read a file from on a hidden directory and it worked fine. What errors are you getting, can you do cat on the file from terminal?
    – Aaron Obeng
    Dec 1 at 16:21










  • What exactly do you mean by cat on the file? Using cat on the file just printed out its content. I added the content to the question.
    – MrYouMath
    Dec 2 at 14:40










  • Please make an MCVE - for example start with a script that just opens and closes the file. If that doesn't help, post the full traceback, cause it's impossible to say what the problem is without the actual error message.
    – wjandrea
    Dec 4 at 21:54










2




2




I just created a python script to read a file from on a hidden directory and it worked fine. What errors are you getting, can you do cat on the file from terminal?
– Aaron Obeng
Dec 1 at 16:21




I just created a python script to read a file from on a hidden directory and it worked fine. What errors are you getting, can you do cat on the file from terminal?
– Aaron Obeng
Dec 1 at 16:21












What exactly do you mean by cat on the file? Using cat on the file just printed out its content. I added the content to the question.
– MrYouMath
Dec 2 at 14:40




What exactly do you mean by cat on the file? Using cat on the file just printed out its content. I added the content to the question.
– MrYouMath
Dec 2 at 14:40












Please make an MCVE - for example start with a script that just opens and closes the file. If that doesn't help, post the full traceback, cause it's impossible to say what the problem is without the actual error message.
– wjandrea
Dec 4 at 21:54






Please make an MCVE - for example start with a script that just opens and closes the file. If that doesn't help, post the full traceback, cause it's impossible to say what the problem is without the actual error message.
– wjandrea
Dec 4 at 21:54

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei