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

Possible OSX module location bug #38343

Closed
logistix mannequin opened this issue Apr 21, 2003 · 3 comments
Closed

Possible OSX module location bug #38343

logistix mannequin opened this issue Apr 21, 2003 · 3 comments
Assignees
Labels

Comments

@logistix
Copy link
Mannequin

logistix mannequin commented Apr 21, 2003

BPO 725026
Nosy @jackjansen

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/jackjansen'
closed_at = <Date 2003-04-21.20:56:38.000>
created_at = <Date 2003-04-21.15:12:44.000>
labels = ['OS-mac']
title = 'Possible OSX module location bug'
updated_at = <Date 2003-04-21.20:56:38.000>
user = 'https://bugs.python.org/logistix'

bugs.python.org fields:

activity = <Date 2003-04-21.20:56:38.000>
actor = 'logistix'
assignee = 'jackjansen'
closed = True
closed_date = None
closer = None
components = ['macOS']
creation = <Date 2003-04-21.15:12:44.000>
creator = 'logistix'
dependencies = []
files = []
hgrepos = []
issue_num = 725026
keywords = []
message_count = 3.0
messages = ['15559', '15560', '15561']
nosy_count = 2.0
nosy_names = ['jackjansen', 'logistix']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue725026'
versions = []

@logistix
Copy link
Mannequin Author

logistix mannequin commented Apr 21, 2003

I have an app with a testfile 'os.py' that was designed to
see if I was searching pythonpath properly (if it found my
os.py, it didn't)

Running scripts from the directory containing this file
has been working fine on Windows, BSD, Linux.

An OSX user reported an error trying to run the scripts.
Output indicated that site.py was trying to load my
os.py instead of the proper one.

I can't reproduce it since I don't have OSX, but if
someone wants to try:

Create a subdirectory under site-packages
Create a dummy os.py file
Create a dummy test.py file
with this directory as the pwd, issue 'python -v test.py'

User didn't appear to have anything too funky in sys.path

@logistix logistix mannequin closed this as completed Apr 21, 2003
@logistix logistix mannequin assigned jackjansen Apr 21, 2003
@logistix logistix mannequin added the OS-mac label Apr 21, 2003
@logistix logistix mannequin assigned jackjansen Apr 21, 2003
@logistix logistix mannequin added the OS-mac label Apr 21, 2003
@jackjansen
Copy link
Member

Logged In: YES
user_id=45365

I tried this with all three of

  • Apple's /usr/bin/python 2.2
  • Python 2.3a2+ from CVS
  • MacPython-OS9 2.3a2+ from CVS

None of these see os.py in the current directory. The only thing I can
imagine, because you talk about a subdirectory of site-packages, is that
the user has a .pth file in site-packages listing the subdirectory.

If this isn't the case, ask for the following:

  • Complete version info (python startup banner)
  • sys.path value
  • output of 'python -v test.py'.

@logistix
Copy link
Mannequin Author

logistix mannequin commented Apr 21, 2003

Logged In: YES
user_id=699438

Here's what he sent me before.
Actually, '/Volumes/Other/dev/python' might be the culprit.
I'm not sure what working directory the commands were run
under.

I'll go ahead and forward a link to this bug to him. Unless he
has any input, I guess it's "Works for Me".

  python -v buildWeb.py
# /usr/lib/python2.2/site.pyc 
matches /usr/lib/python2.2/site.py import site # precompiled 
from /usr/lib/python2.2/site.pyc # ./os.pyc matches ./os.py 
import os # precompiled from ./os.pyc Ugh! 'import site' failed; 
traceback: Traceback (most recent call last):
   File "/usr/lib/python2.2/site.py", line 69, in ?
     m.__file__ = os.path.abspath(m.__file__)
AttributeError: 'module' object has no attribute 'path'
Python 2.2 (#1, 07/14/02, 23:25:09)
[GCC Apple cpp-precomp 6.14] on darwin
Type "help", "copyright", "credits" or "license" for more 
information. ...

% python -c "import sys;print sys.path"
['', '/Volumes/Other/dev/python', '/usr/lib/python2.2',
'/usr/lib/python2.2/plat-darwin', '/usr/lib/python2.2/lib-tk',
'/usr/lib/python2.2/lib-dynload', '/usr/lib/python2.2/site-
packages']

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant