This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ADataGman
Recipients ADataGman, brett.cannon, docs@python, eric.snow, ncoghlan, terry.reedy
Date 2019-02-09.06:16:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAJnDJ=YLUAqwTHRdP7kOnNnLiogzJjmaXaQqeQZo8XmsaRPjVQ@mail.gmail.com>
In-reply-to <1549654261.52.0.212780914748.issue35927@roundup.psfhosted.org>
Content
Here's the full error log I receive when using the code I submitted with
both ..effects and sound.effects. It also includes a print out of the sys
path as run from vocoder.

I tried running this in 3.7.2 and still get the same errors. It seems like
it's already on the sys path? I'm not saying there is a bug in python
itself, it's just not at all clear from the documentation that what is
described as being a way to access sibling packages actually works.

Given the attached code sample, as a newb I'd greatly appreciate an example
of how to take that sample and turn it into functioning code with whatever
modifiers is necessary. Ultimately whatever changes are made I'd like to
see reflected in the documentation for the intra-reference section.

PS C:\sound> &
C:/Users/user/AppData/Local/Programs/Python/Python37/python.exe
c:/sound/filters/vocoder.py
Traceback (most recent call last):
  File "c:/sound/filters/vocoder.py", line 7, in <module>
    vocoder.pp()
  File "c:/sound/filters/vocoder.py", line 4, in pp
    from ..effects import echo
ValueError: attempted relative import beyond top-level package
PS C:\sound> &
C:/Users/user/AppData/Local/Programs/Python/Python37/python.exe
c:/sound/filters/vocoder.py
Traceback (most recent call last):
  File "c:/sound/filters/vocoder.py", line 7, in <module>
    vocoder.pp()
  File "c:/sound/filters/vocoder.py", line 4, in pp
    from sound.effects import echo
ModuleNotFoundError: No module named 'sound'
PS C:\sound> &
C:/Users/user/AppData/Local/Programs/Python/Python37/python.exe
c:/sound/filters/vocoder.py
['c:\\sound\\filters',
'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip',
'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python37\\DLLs',
'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python37\\lib',
'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python37',
'C:\\Users\\user\\AppData\\Roaming\\Python\\Python37\\site-packages',
'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages']

On Fri, Feb 8, 2019 at 2:31 PM Terry J. Reedy <report@bugs.python.org>
wrote:

>
> Terry J. Reedy <tjreedy@udel.edu> added the comment:
>
> When reporting problems, copy and paste into the report the complete
> exception traceback and error message.  For import problems, also copy and
> paste sys.path.  If you disagree that this should be closed, please do so.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue35927>
> _______________________________________
>
History
Date User Action Args
2019-02-09 06:16:24ADataGmansetrecipients: + ADataGman, brett.cannon, terry.reedy, ncoghlan, docs@python, eric.snow
2019-02-09 06:16:22ADataGmanlinkissue35927 messages
2019-02-09 06:16:21ADataGmancreate