On Tue, Jun 07, 2016 at 11:13:30PM -0300, Akihiko Sato wrote: > Hello Dave, > Thank you for your answer. > Yes, the problem was the Python Version. I installed the last version > Python3.5. > Now, when I run the demo "python generateDS.py -s outline_extended.py > outline.xsd" the traceback show the following messages: > Traceback (most recent call last): > Â File > "/home/akihiko/PycharmProjects/generateDS-2.22a0/generateDS.py", line > 7082, in <module> > Â Â Â main() > Â File > "/home/akihiko/PycharmProjects/generateDS-2.22a0/generateDS.py", line > 7070, in main > Â Â Â processIncludes, options, args, superModule=superModule) > Â File > "/home/akihiko/PycharmProjects/generateDS-2.22a0/generateDS.py", line > 6613, in parseAndGenerate > Â Â Â import process_includes > Â File > "/home/akihiko/PycharmProjects/generateDS-2.22a0/process_includes.py", > line 28, in <module> > Â Â Â from lxml import etree > ImportError: No module named 'lxml' > Process finished with exit code 1 > Am I doing anything wrong? Am I installed correctly the generateDS? > Thanks again.
Akihiko, No, you are not doing anything wrong. But, you do need to install lxml. That is the XML support package used by generateDS.py itself and also by the Python modules that it generates. You can learn about lxml here: https://pypi.python.org/pypi/lxml And, here: http://lxml.de/index.html You should be able to install it by executing: $ pip install lxml Or, on Linux: $ sudo pip install lxml Then, run something like the following: $ python generateDS.py -o outlinelib.py -s outline_extended.py outline.xsd Hope this helps. Let me know if and when you have more questions. Dave > Akihiko > 2016-06-07 20:24 GMT-03:00 Dave Kuhlman <[1]dkuhl...@davekuhlman.org>: > > On Tue, Jun 07, 2016 at 12:14:56AM -0300, Akihiko Sato wrote: > >  Dear Mr. Dave, > >  I am trying to learn how to run the program generateDS and I > am facing > >  a error I can not understand. When I run the #generateDS it > is showing > >  the error "AttributeError: 'tuple' object has no attribute > 'major'. It > >  happens for any command with #generateDS, including the > command line > >  #generateDS -h. > >  Could you explain what I doing wrong? > >  Congratulation for your iniciative. > Akihiko, > Could it be the Python version that is the problem? What version > of > Python are you using? You did not include a traceback, and > therefore I > can't be sure, but the one place "major" is used is when checking > the > version to determine whether we're running under Python 2 or Python > 3. > For example: >   if sys.version_info.major == 2: >     ... > That line of code assumes that "sys.version_info" is a named > tuple. The > documentation on named tuples says that they are "New in version > 2.6". > See: >   [2]https://docs.python.org/2/library/collections.html > At [3]https://www.python.org/doc/versions/ it tells me that Python > 2.6 was > released on 1 October 2008. If that is our problem, it means that > your > version of Python is very old. I'd suggest that you upgrade to a > more > recent version, if you can. > If that is not the problem, then please (1) tell me what version of > Python you are using and (2) send me a traceback. > Hope this helps. > Dave > -- > Dave Kuhlman > [4]http://www.davekuhlman.org > > References > > 1. mailto:dkuhl...@davekuhlman.org > 2. https://docs.python.org/2/library/collections.html > 3. https://www.python.org/doc/versions/ > 4. http://www.davekuhlman.org/ -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users