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

password after import statement #22

Open
rawmean opened this issue Jul 29, 2022 · 6 comments
Open

password after import statement #22

rawmean opened this issue Jul 29, 2022 · 6 comments

Comments

@rawmean
Copy link

rawmean commented Jul 29, 2022

import pyapl works by from pynapl import APL asks for password. What am I doing wrong? What password is it asking for. I'm on Mac. Thanks!

@rodrigogiraoserrao
Copy link
Contributor

rodrigogiraoserrao commented Jul 29, 2022 via email

@rawmean
Copy link
Author

rawmean commented Jul 30, 2022

You are right; import pynapl also required password. It doesn't complain after I enter the machine password (this is the only module that asks for machine password. Have you tried it on a macOS?).
It doesn't seem to be able to find APL.py. I've even copied a local version of the file in the current folder.
Can you please advise on proper installation procedure? I'm using anaconda.

image

@0racle
Copy link

0racle commented Apr 21, 2023

I have this same issue, running under WSL2. Why is this module even asking for a password on import?

@rodrigogiraoserrao
Copy link
Contributor

It is highly likely that the issue is coming from the fact that the current pynapl will use a temporary auxiliary file when starting the connection between APL and Python, and it must be trying to write that file to a folder it doesn't have access to.
This issue is being addressed.

This is the temporary auxiliary file:

script="""
⎕PW←32767
{}2⎕FIX'file://%s'
{}2⎕FIX'file://%s'
infile←'%s'
outfile←'%s'
Py.StartAPLSlave infile outfile
)OFF
"""

And this is where it's being written:

with open(to_bytes(os.path.dirname(SCRIPTFILE))+b'/WinPort.dyalog', "wb") as f:

@0racle
Copy link

0racle commented Apr 24, 2023

I think the issue is not with the actual pynapl package at all. I had installed is via pip (PyPI) which installs a completely different library. Of some minor concern, the pynapl package on PyPI attempts to send an email, but looking over the code, it doesn't look like it sends any sensitive/user data. It looks like maybe the module on PyPI is a student project just trying to send a test email via Gmail's SMTP.

There is a risk that this other module could be modified to do something malicious, and people attempting to interface Python and APL will install this other module.

It's recommended that this project either attempt to gain ownership of the pynapl name on PyPI, or rename and claim the new name on PyPI.

@rodrigogiraoserrao
Copy link
Contributor

Excellent investigation. I see pynapl taken on PyPI as a completely unrelated library. I will reach out to the owner of that name and see if they'd be willing to give up the name so we can take it.

@rawmean this might've been your issue as well.

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

No branches or pull requests

3 participants