Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'module' object has no attribute 'symlink' #8

Open
GoogleCodeExporter opened this issue Feb 11, 2016 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

I get the following traceback when I try to run "apptracectl init .". Is 
apptrace only supported on unix based systems?

Traceback (most recent call last):
  File "c:\Python27\Scripts\apptracectl-script.py", line 9, in <module>
    load_entry_point('apptrace==0.2.3', 'console_scripts', 'apptracectl')()
  File "c:\Python27\lib\site-packages\apptrace-0.2.3-py2.7.egg\apptrace\scripts\apptracectl.py", line 132, in main
    initApptracePackage(app_root, [guppy])
  File "c:\Python27\lib\site-packages\apptrace-0.2.3-py2.7.egg\apptrace\scripts\apptracectl.py", line 92, in initApptracePackage
    ignore=True)
  File "c:\Python27\lib\site-packages\apptrace-0.2.3-py2.7.egg\apptrace\scripts\apptracectl.py", line 70, in copytree
    copytree(srcname, dstname, symlinks, exclude, ignore)
  File "c:\Python27\lib\site-packages\apptrace-0.2.3-py2.7.egg\apptrace\scripts\apptracectl.py", line 72, in copytree
    os.symlink(srcname, dstname)
AttributeError: 'module' object has no attribute 'symlink'

C:\Users\speedplane\Documents\Work\2010 - 2011\Programs\DocketUpdater>




Original issue reported on code.google.com by michael....@gmail.com on 7 Dec 2012 at 5:15

@GoogleCodeExporter
Copy link
Author

FYI, this can be fixed by editing:
   C:\Python27\Lib\site-packages\apptrace-0.2.3-py2.7.egg\apptrace\scripts\apptracectl.py

and replacing the references to os.symlink(srcname, dstname) with:


                try:
                    os.symlink(srcname, dstname)
                except:
                    import ctypes
                    kdll = ctypes.windll.LoadLibrary("kernel32.dll")
                    kdll.CreateSymbolicLinkA(srcname, dstname, 0)

Original comment by michael....@gmail.com on 7 Dec 2012 at 5:27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant