adyeths / u2o

USFM to OSIS bible format converter.
The Unlicense
19 stars 6 forks source link

Unable to run on Windows 10 #51

Closed bhigham closed 6 years ago

bhigham commented 6 years ago

Hi, I have been experimenting trying to use this u2o.py, and have been able to using Python 2.7.14 on Linux, but am unable to run this on Windows 10. I tried with Python 2.7 as well as 3.4. I am not an experienced python user, so it is likely that I am doing something wrong. Using the same syntax that I used in Linux, in Windows 10 it gives me an error that it is unable to find or open the input file. Can you give me some examples of your typical syntax? Thanks much Bruce

DavidHaslam commented 6 years ago

You didn't say, but have you tried using u2o.py in CygWin assuming that you've installed a suitable Python package ?

I use it in CygWin under Windows 7.

DavidHaslam commented 6 years ago

Cygwin

bhigham commented 6 years ago

Thanks for the prompt replies. I haven't tried it with Cygwin, I just installed Python 2.7 from Python.org I am currently installing cygwin, and I will try that and see if it makes a difference. Thanks

adyeths commented 6 years ago

When I get some time over the next few days I will do some testing to see how to run it in Windows 10 (both with and without cygwin). I use linux exclusively on my computer so I have no experience running this on any other operating systems.

Also, I highly recommend using Python3. Python2 will reach it's end of life in 2020 (see pep 373).

bhigham commented 6 years ago

Thanks. It looks like it handles the files very well, and it is definitely quick. The main reason I went with 2.7 is that with Python 3, in a non Cygwin Windows, I couldn't get the file to run at all. However, I haven't done much with Github and might have been trying to get the wrong files. I was never able to do anything with the files in the Master branch, but when I went to the releases page and downloaded the source code for 0.6, I was able to run that on Linux. So after that I just tried to get that working in Windows. I was able to run it in Cygwin today, using Python 2.7 Thanks for your work on this Bruce

adyeths commented 6 years ago

Well, this is interesting. I was not able to get u2o to run in windows 10 using the native windows python3 interpreter. If you were able to get it to actually run and try to do something then you were more successful than I was. I just got errors for things that were not errors and it failed to even run. I have no idea why.

The only thing that worked for me was installing cygwin and using the python3 interpreter included with that environment in Windows 10.

DavidHaslam commented 6 years ago

Has anyone succeeded in running u2o.py under ActivePython in a Windows PC ?

adyeths commented 6 years ago

I'm not aware of anyone trying to run it using ActivePython yet. I may make an attempt the next time I decide to boot into Windows. There's no valid reason why any of these should not work. There isn't anything in the code that is specific to a *nix environment as far as I'm aware. I'm still trying to figure out why it won't work with the windows version that I already tried. Makes no sense to me.

adyeths commented 6 years ago

There were two issues that prevented u2o from running (or running properly) in Windows 10

1) The coding line in the script was improperly specified. Apparently windows is a bit more picky about that than linux. 2) The command line (cmd) in windows doesn't do automatic wildcard expansion like bash does in linux. So I had to add some code to handle that in the u2o script itself.

It should work for you now using the native windows python intepreter. I have tested the changes on my computer using python3 and it worked for me.