XLSForm convertion using python command

Hello ,

I am a windows 7 64-bit user and want to transform excel sheets to xform
with a help of an offline converter . I downloaded the offline converter
windows version but for some reason i was unable to get the output in
output directory . So i tried to do it manually using the python script . i
downloaded and installed everything from this link*
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md* and installed
python and its path, tools and utils successfully . then i downloaded
pyxform from this link https://github.com/UW-ICTD/pyxform and kept the
directory in c drive on root . and they i downloaded the sample_test.xls
and kept in the pyxform directory and also created an output directory
inside pyxform directory .
I am getting this error when i am running this script in windows command
prompt .

C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls"
"c:\pyxform\output"Traceback (most recent call last): File "xls2xform.py",
line 7, in import builder File "C:\pyxform\builder.py", line
4, in from survey import Survey File "C:\pyxform\survey.py",
line 13, in from pyxform import constantsImportError: No module
named pyxform

Please suggest .

Many Thanks,
Muhammad Ali

I think the easiest way to install pyxform is 'pip install pyxform'.

See https://github.com/SEL-Columbia/pyxform

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Tue, Jun 3, 2014 at 1:26 AM, Muhammad ALi malizahid52@gmail.com wrote:

Hello ,

I am a windows 7 64-bit user and want to transform excel sheets to xform
with a help of an offline converter . I downloaded the offline converter
windows version but for some reason i was unable to get the output in output
directory . So i tried to do it manually using the python script . i
downloaded and installed everything from this link
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed
python and its path, tools and utils successfully . then i downloaded
pyxform from this link https://github.com/UW-ICTD/pyxform and kept the
directory in c drive on root . and they i downloaded the sample_test.xls and
kept in the pyxform directory and also created an output directory inside
pyxform directory .
I am getting this error when i am running this script in windows command
prompt .

C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls"
"c:\pyxform\output"
Traceback (most recent call last):
File "xls2xform.py", line 7, in
import builder
File "C:\pyxform\builder.py", line 4, in
from survey import Survey
File "C:\pyxform\survey.py", line 13, in
from pyxform import constants
ImportError: No module named pyxform

Please suggest .

Many Thanks,
Muhammad Ali

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Yaw ,

Thanks for your suggestion , i downloaded the pyxform through pip command .
still no luck :frowning:
anyother possibility of running the command ?

Thanks,
Muhammad Ali

ยทยทยท On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote: > > Hello , > > I am a windows 7 64-bit user and want to transform excel sheets to xform > with a help of an offline converter . I downloaded the offline converter > windows version but for some reason i was unable to get the output in > output directory . So i tried to do it manually using the python script . i > downloaded and installed everything from this link* > https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md > * and > installed python and its path, tools and utils successfully . then i > downloaded *pyxform* from this link *https://github.com/UW-ICTD/pyxform > * and kept the directory in c drive > on root . and they i downloaded the sample_test.xls and kept in the pyxform > directory and also created an output directory inside pyxform directory . > I am getting this error when i am running this script in windows command > prompt . > > > > > > > > > > *C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls" > "c:\pyxform\output"Traceback (most recent call last): File "xls2xform.py", > line 7, in import builder File "C:\pyxform\builder.py", line > 4, in from survey import Survey File "C:\pyxform\survey.py", > line 13, in from pyxform import constantsImportError: No module > named pyxform* > > Please suggest . > > Many Thanks, > Muhammad Ali > > > >

Hi Yaw ,

Yes it is running . i went to python command line and typed print 'hello
world' and it is printing that in second line .
Do i need to type that command on python command line ? i was using windows
terminal to run that script ?

Thanks ,
Muhammad Ali

ยทยทยท On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote: > > Hello , > > I am a windows 7 64-bit user and want to transform excel sheets to xform > with a help of an offline converter . I downloaded the offline converter > windows version but for some reason i was unable to get the output in > output directory . So i tried to do it manually using the python script . i > downloaded and installed everything from this link* > https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md > * and > installed python and its path, tools and utils successfully . then i > downloaded *pyxform* from this link *https://github.com/UW-ICTD/pyxform > * and kept the directory in c drive > on root . and they i downloaded the sample_test.xls and kept in the pyxform > directory and also created an output directory inside pyxform directory . > I am getting this error when i am running this script in windows command > prompt . > > > > > > > > > > *C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls" > "c:\pyxform\output"Traceback (most recent call last): File "xls2xform.py", > line 7, in import builder File "C:\pyxform\builder.py", line > 4, in from survey import Survey File "C:\pyxform\survey.py", > line 13, in from pyxform import constantsImportError: No module > named pyxform* > > Please suggest . > > Many Thanks, > Muhammad Ali > > > >

Muhammad,

Don't know what to tell you. There's maybe something broken with your
Python install? Or maybe something broken with Python on Windows? Does
a basic hello world python app work?

Try an Ubuntu desktop VM. Or file an issue at
https://github.com/SEL-Columbia/pyxform/issues. Or ask on
https://groups.google.com/forum/#!forum/formhub-developers.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Tue, Jun 3, 2014 at 11:03 AM, Muhammad ALi malizahid52@gmail.com wrote:

Hi Yaw ,

Thanks for your suggestion , i downloaded the pyxform through pip command .
still no luck :frowning:
anyother possibility of running the command ?

Thanks,
Muhammad Ali

On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote:

Hello ,

I am a windows 7 64-bit user and want to transform excel sheets to xform
with a help of an offline converter . I downloaded the offline converter
windows version but for some reason i was unable to get the output in output
directory . So i tried to do it manually using the python script . i
downloaded and installed everything from this link
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed
python and its path, tools and utils successfully . then i downloaded
pyxform from this link https://github.com/UW-ICTD/pyxform and kept the
directory in c drive on root . and they i downloaded the sample_test.xls and
kept in the pyxform directory and also created an output directory inside
pyxform directory .
I am getting this error when i am running this script in windows command
prompt .

C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls"
"c:\pyxform\output"
Traceback (most recent call last):
File "xls2xform.py", line 7, in
import builder
File "C:\pyxform\builder.py", line 4, in
from survey import Survey
File "C:\pyxform\survey.py", line 13, in
from pyxform import constants
ImportError: No module named pyxform

Please suggest .

Many Thanks,
Muhammad Ali

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

This is all I have to do to get it working...

$ cd /usr/local/lib/python2.7/site-packages/pyxform;
$ python xls2xform.py ~/Desktop/Form.xlsx ~/Desktop/Form.xml;

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Tue, Jun 3, 2014 at 12:10 PM, Muhammad ALi malizahid52@gmail.com wrote:

Hi Yaw ,

Yes it is running . i went to python command line and typed print 'hello
world' and it is printing that in second line .
Do i need to type that command on python command line ? i was using windows
terminal to run that script ?

Thanks ,

Muhammad Ali

On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote:

Hello ,

I am a windows 7 64-bit user and want to transform excel sheets to xform
with a help of an offline converter . I downloaded the offline converter
windows version but for some reason i was unable to get the output in output
directory . So i tried to do it manually using the python script . i
downloaded and installed everything from this link
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed
python and its path, tools and utils successfully . then i downloaded
pyxform from this link https://github.com/UW-ICTD/pyxform and kept the
directory in c drive on root . and they i downloaded the sample_test.xls and
kept in the pyxform directory and also created an output directory inside
pyxform directory .
I am getting this error when i am running this script in windows command
prompt .

C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls"
"c:\pyxform\output"
Traceback (most recent call last):
File "xls2xform.py", line 7, in
import builder
File "C:\pyxform\builder.py", line 4, in
from survey import Survey
File "C:\pyxform\survey.py", line 13, in
from pyxform import constants
ImportError: No module named pyxform

Please suggest .

Many Thanks,
Muhammad Ali

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

1 Like

This is all I have to do to get it working...

$ cd /usr/local/lib/python2.7/site-packages/pyxform;

$ python xls2xform.py ~/Desktop/Form.xlsx ~/Desktop/Form.xml;

Yaw

--

Need ODK services? http://nafundi.com provides form design, server

setup, professional support, and software development for ODK.

Hi Yaw ,

Yes it is running . i went to python command line and typed print 'hello

world' and it is printing that in second line .

Do i need to type that command on python command line ? i was using windows

terminal to run that script ?

Thanks ,

Muhammad Ali

Hello ,

I am a windows 7 64-bit user and want to transform excel sheets to xform

with a help of an offline converter . I downloaded the offline converter

windows version but for some reason i was unable to get the output in output

directory . So i tried to do it manually using the python script . i

downloaded and installed everything from this link

https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed

python and its path, tools and utils successfully . then i downloaded

pyxform from this link https://github.com/UW-ICTD/pyxform and kept the

directory in c drive on root . and they i downloaded the sample_test.xls and

kept in the pyxform directory and also created an output directory inside

pyxform directory .

I am getting this error when i am running this script in windows command

prompt .

C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls"

"c:\pyxform\output"

Traceback (most recent call last):

File "xls2xform.py", line 7, in

import builder

File "C:\pyxform\builder.py", line 4, in

from survey import Survey

File "C:\pyxform\survey.py", line 13, in

from pyxform import constants

ImportError: No module named pyxform

Please suggest .

Many Thanks,

Muhammad Ali

--

--

Post: opendatakit@googlegroups.com

Unsubscribe: opendatakit+unsubscribe@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups

"ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send an

email to opendatakit+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dear Muhammad

I had the same problem.

To fix, please go to survey.py, line 13 and remove "from pyxform", so the line should only read "import constants".

This worked for me and I can now convert xls to xml under Windows (7) with pyxform.

Hope this can help somebody else aswell.

ยทยทยท On Tuesday, June 3, 2014 9:26:53 PM UTC+2, Yaw Anokwa wrote: > On Tue, Jun 3, 2014 at 12:10 PM, Muhammad ALi wrote: > > On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote: From my limited python knowledge, the import expects a file pyxform, which does not exist (at least not in my case), but with the edit it will load the file constants.py instead.

One prolem when run pyxform on version 0.9.22 is in functin def _java_installed():
which command is on linux but in window, where command is used

ยทยทยท On Tuesday, August 12, 2014 1:32:09 PM UTC+7, haarerau...@gmail.com wrote: > On Tuesday, June 3, 2014 9:26:53 PM UTC+2, Yaw Anokwa wrote: > > This is all I have to do to get it working... > > > > > > > > $ cd /usr/local/lib/python2.7/site-packages/pyxform; > > > > $ python xls2xform.py ~/Desktop/Form.xlsx ~/Desktop/Form.xml; > > > > > > > > Yaw > > > > -- > > > > Need ODK services? http://nafundi.com provides form design, server > > > > setup, professional support, and software development for ODK. > > > > > > > > On Tue, Jun 3, 2014 at 12:10 PM, Muhammad ALi wrote: > > > > > Hi Yaw , > > > > > > > > > > Yes it is running . i went to python command line and typed print 'hello > > > > > world' and it is printing that in second line . > > > > > Do i need to type that command on python command line ? i was using windows > > > > > terminal to run that script ? > > > > > > > > > > Thanks , > > > > > > > > > > Muhammad Ali > > > > > > > > > > On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote: > > > > >> > > > > >> Hello , > > > > >> > > > > >> I am a windows 7 64-bit user and want to transform excel sheets to xform > > > > >> with a help of an offline converter . I downloaded the offline converter > > > > >> windows version but for some reason i was unable to get the output in output > > > > >> directory . So i tried to do it manually using the python script . i > > > > >> downloaded and installed everything from this link > > > > >> https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed > > > > >> python and its path, tools and utils successfully . then i downloaded > > > > >> pyxform from this link https://github.com/UW-ICTD/pyxform and kept the > > > > >> directory in c drive on root . and they i downloaded the sample_test.xls and > > > > >> kept in the pyxform directory and also created an output directory inside > > > > >> pyxform directory . > > > > >> I am getting this error when i am running this script in windows command > > > > >> prompt . > > > > >> > > > > >> C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls" > > > > >> "c:\pyxform\output" > > > > >> Traceback (most recent call last): > > > > >> File "xls2xform.py", line 7, in > > > > >> import builder > > > > >> File "C:\pyxform\builder.py", line 4, in > > > > >> from survey import Survey > > > > >> File "C:\pyxform\survey.py", line 13, in > > > > >> from pyxform import constants > > > > >> ImportError: No module named pyxform > > > > >> > > > > >> Please suggest . > > > > >> > > > > >> Many Thanks, > > > > >> Muhammad Ali > > > > >> > > > > >> > > > > >> > > > > > -- > > > > > -- > > > > > Post: opendatakit@googlegroups.com > > > > > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > > > > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > > > > > > > --- > > > > > You received this message because you are subscribed to the Google Groups > > > > > "ODK Community" group. > > > > > To unsubscribe from this group and stop receiving emails from it, send an > > > > > email to opendatakit+unsubscribe@googlegroups.com. > > > > > For more options, visit https://groups.google.com/d/optout. > > Dear Muhammad > > I had the same problem. > > To fix, please go to survey.py, line 13 and remove "from pyxform", so the line should only read "import constants". > > From my limited python knowledge, the import expects a file pyxform, which does not exist (at least not in my case), but with the edit it will load the file constants.py instead. > > This worked for me and I can now convert xls to xml under Windows (7) with pyxform. > > Hope this can help somebody else aswell.

Another prolem is unicode for select one external. Do not support unicode

ยทยทยท On Tuesday, August 12, 2014 1:32:09 PM UTC+7, haarerau...@gmail.com wrote: > On Tuesday, June 3, 2014 9:26:53 PM UTC+2, Yaw Anokwa wrote: > > This is all I have to do to get it working... > > > > > > > > $ cd /usr/local/lib/python2.7/site-packages/pyxform; > > > > $ python xls2xform.py ~/Desktop/Form.xlsx ~/Desktop/Form.xml; > > > > > > > > Yaw > > > > -- > > > > Need ODK services? http://nafundi.com provides form design, server > > > > setup, professional support, and software development for ODK. > > > > > > > > On Tue, Jun 3, 2014 at 12:10 PM, Muhammad ALi wrote: > > > > > Hi Yaw , > > > > > > > > > > Yes it is running . i went to python command line and typed print 'hello > > > > > world' and it is printing that in second line . > > > > > Do i need to type that command on python command line ? i was using windows > > > > > terminal to run that script ? > > > > > > > > > > Thanks , > > > > > > > > > > Muhammad Ali > > > > > > > > > > On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote: > > > > >> > > > > >> Hello , > > > > >> > > > > >> I am a windows 7 64-bit user and want to transform excel sheets to xform > > > > >> with a help of an offline converter . I downloaded the offline converter > > > > >> windows version but for some reason i was unable to get the output in output > > > > >> directory . So i tried to do it manually using the python script . i > > > > >> downloaded and installed everything from this link > > > > >> https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed > > > > >> python and its path, tools and utils successfully . then i downloaded > > > > >> pyxform from this link https://github.com/UW-ICTD/pyxform and kept the > > > > >> directory in c drive on root . and they i downloaded the sample_test.xls and > > > > >> kept in the pyxform directory and also created an output directory inside > > > > >> pyxform directory . > > > > >> I am getting this error when i am running this script in windows command > > > > >> prompt . > > > > >> > > > > >> C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls" > > > > >> "c:\pyxform\output" > > > > >> Traceback (most recent call last): > > > > >> File "xls2xform.py", line 7, in > > > > >> import builder > > > > >> File "C:\pyxform\builder.py", line 4, in > > > > >> from survey import Survey > > > > >> File "C:\pyxform\survey.py", line 13, in > > > > >> from pyxform import constants > > > > >> ImportError: No module named pyxform > > > > >> > > > > >> Please suggest . > > > > >> > > > > >> Many Thanks, > > > > >> Muhammad Ali > > > > >> > > > > >> > > > > >> > > > > > -- > > > > > -- > > > > > Post: opendatakit@googlegroups.com > > > > > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > > > > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > > > > > > > --- > > > > > You received this message because you are subscribed to the Google Groups > > > > > "ODK Community" group. > > > > > To unsubscribe from this group and stop receiving emails from it, send an > > > > > email to opendatakit+unsubscribe@googlegroups.com. > > > > > For more options, visit https://groups.google.com/d/optout. > > Dear Muhammad > > I had the same problem. > > To fix, please go to survey.py, line 13 and remove "from pyxform", so the line should only read "import constants". > > From my limited python knowledge, the import expects a file pyxform, which does not exist (at least not in my case), but with the edit it will load the file constants.py instead. > > This worked for me and I can now convert xls to xml under Windows (7) with pyxform. > > Hope this can help somebody else aswell.

Please file bugs for pyxform at
https://github.com/xlsform/pyxform/issues. In the case of the unicode
issue, it would be great if you attached an example.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Sep 5, 2014 at 5:08 AM, lethanhtu36@gmail.com wrote:

One prolem when run pyxform on version 0.9.22 is in functin def _java_installed():
which command is on linux but in window, where command is used

On Tuesday, August 12, 2014 1:32:09 PM UTC+7, haarerau...@gmail.com wrote:

On Tuesday, June 3, 2014 9:26:53 PM UTC+2, Yaw Anokwa wrote:

This is all I have to do to get it working...

$ cd /usr/local/lib/python2.7/site-packages/pyxform;

$ python xls2xform.py ~/Desktop/Form.xlsx ~/Desktop/Form.xml;

Yaw

--

Need ODK services? http://nafundi.com provides form design, server

setup, professional support, and software development for ODK.

On Tue, Jun 3, 2014 at 12:10 PM, Muhammad ALi malizahid52@gmail.com wrote:

Hi Yaw ,

Yes it is running . i went to python command line and typed print 'hello

world' and it is printing that in second line .

Do i need to type that command on python command line ? i was using windows

terminal to run that script ?

Thanks ,

Muhammad Ali

On Tuesday, June 3, 2014 1:26:34 PM UTC+5, Muhammad ALi wrote:

Hello ,

I am a windows 7 64-bit user and want to transform excel sheets to xform

with a help of an offline converter . I downloaded the offline converter

windows version but for some reason i was unable to get the output in output

directory . So i tried to do it manually using the python script . i

downloaded and installed everything from this link

https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md and installed

python and its path, tools and utils successfully . then i downloaded

pyxform from this link https://github.com/UW-ICTD/pyxform and kept the

directory in c drive on root . and they i downloaded the sample_test.xls and

kept in the pyxform directory and also created an output directory inside

pyxform directory .

I am getting this error when i am running this script in windows command

prompt .

C:\pyxform>python xls2xform.py "c:\pyxform\sample_test.xls"

"c:\pyxform\output"

Traceback (most recent call last):

File "xls2xform.py", line 7, in

import builder

File "C:\pyxform\builder.py", line 4, in

from survey import Survey

File "C:\pyxform\survey.py", line 13, in

from pyxform import constants

ImportError: No module named pyxform

Please suggest .

Many Thanks,

Muhammad Ali

--

--

Post: opendatakit@googlegroups.com

Unsubscribe: opendatakit+unsubscribe@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups

"ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send an

email to opendatakit+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dear Muhammad

I had the same problem.

To fix, please go to survey.py, line 13 and remove "from pyxform", so the line should only read "import constants".

From my limited python knowledge, the import expects a file pyxform, which does not exist (at least not in my case), but with the edit it will load the file constants.py instead.

This worked for me and I can now convert xls to xml under Windows (7) with pyxform.

Hope this can help somebody else aswell.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.