GetHelpFileName wants to write to /usr/bin

Bug #270514 reported by Jurgis Pralgauskis
2
Affects Status Importance Assigned to Milestone
Algorithms Animator
New
Undecided
Unassigned

Bug Description

jurgis@jurgis-laptop:~/tmp/algorithms-animator/devel/src$ python AlgorithmsAnimator.py
Traceback (most recent call last):
  File "AlgorithmsAnimator.py", line 1, in <module>
    import csc321
  File "/home/jurgis/tmp/algorithms-animator/devel/src/csc321.py", line 17, in <module>
    import csc321init
  File "/home/jurgis/tmp/algorithms-animator/devel/src/csc321init.py", line 28, in <module>
    helpfile=getHelpFileName()
  File "/home/jurgis/tmp/algorithms-animator/devel/src/csc321heldp.py", line 1299, in getHelpFileName
    file=open(filename, 'w')
IOError: [Errno 13] Permission denied: '/usr/bin/csc321index.html'

probably this depends on sys.executable and how I start AA
If I put executable flag on main script and run it directly this does'nt happen

Revision history for this message
Jurgis Pralgauskis (jurgis-pralgauskis) wrote :

#__file__ instead of sys.executable solves the problem
def getHelpFileName():
    filename=os.path.join(os.path.dirname(__file__), 'csc321index.html')

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.