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

bin/sharepoint error #11

Open
mixmastamyk opened this issue Apr 9, 2014 · 4 comments
Open

bin/sharepoint error #11

mixmastamyk opened this issue Apr 9, 2014 · 4 comments

Comments

@mixmastamyk
Copy link

When trying to use the command line script "sharepoint" (in Windows) I was getting an error that the "module cmd was not found."

After a lot of investigation I realized the problem was happening because the script is the same name as the package. It was importing itself and getting confused.

This happens I believe because I was in the Python\Scripts folder, as it is not on my path. Seems to work from other folders.

@alexdutton
Copy link
Contributor

As strange as it might seem, what with it being SharePoint being
an MS thing, I'be never actually tested this code on Windows.

I suspect the answer is a "from future import absolute_import" in bin/sharepoint.py. I'm not near a computer at the moment, but if I make this change tomorrow, would you be able to test it and report back?

@mixmastamyk
Copy link
Author

Sure. I'm using a VM incidentally.

@alexdutton
Copy link
Contributor

I've just pushed said commit (along with another that adds Py3 support).

@mixmastamyk
Copy link
Author

Sorry, something wrong must have happened the first time. I can't reproduce the error. :(

Perhaps I can still offer something helpful. I notice your script "sharepoint" won't run on windows because it has no file extension. One way I've solved this is to include a .cmd file in the package to run it. Here is an example:

https://bitbucket.org/mixmastamyk/fr/src/default/fr.cmd

name it sharepoint.cmd . How to install it: (search for .cmd)

https://bitbucket.org/mixmastamyk/fr/src/default/setup.py

Also, I'd guess the reason your PyPi readme isn't being converted to markdown is because of the line starting with "..." as that is an .rst directive.

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

2 participants