Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #8943

Closed
Open
Opened May 22, 2013 by David Fifield@dcf

Use of __file__ incompatible with py2exe

Running a py2exe of obfsproxy:

$ /cygdrive/c/Python27/python.exe setup_py2exe.py py2exe
$ ./py2exe_bundle/dist/obfsproxy.exe
Traceback (most recent call last):
  File "obfsproxy", line 6, in <module>
NameError: name '__file__' is not defined

It works before the change in a66db465:

$ ./py2exe_bundle/dist/pyobfsproxy.exe
usage: pyobfsproxy.exe [-h] [--log-file LOG_FILE]
                       [--log-min-severity {error,warning,info,debug}]
                       [--no-log] [--no-safe-logging]
                       {managed,obfs2,dummy,obfs3,b64} ...
pyobfsproxy.exe: error: too few arguments

I don't know if this trick used in flashproxy will help:

    if getattr(sys, "frozen", False):
        script_dir = os.path.dirname(sys.executable)
    else:
        script_dir = sys.path[0]
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#8943