Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    why tuples encounter some wrong in the linux server Stata while it is Ok in my Mac Stata

    for linux Stata, the wrong code is:
    Traceback (most recent call last):
    File "/home/lixy/ado/plus/py/st_tuples_py.py", line 33, in <module>
    exec("tuplelist = list(filter(lambda tupl: " + py_condits + ", tuplelist))"
    > )
    File "<string>", line 1, in <module>
    File "<string>", line 1, in <lambda>
    NameError: name 'tupl0' is not defined
    failed to execute the specified Python script file
    r(7103);

    Comment


    • #17
      Despite the lack of a fully reproducible (minimal) example, I have had a chance to look into this for a couple of minutes. I have identified at least one problem that causes failure for conditionals larger than 9, i.e., conditionals with two or more digits. The problem is with the Python code; I will get in contact with Joe about this issue.

      Concerning Linux vs, Mac OS: do you have (the same) Python installed on both? If you do not have Python on the Mac OS, then tuples will default to the nopython method, which should work fine. This is also the short-term workaround: use the nopython option. A long-term fix is coming but it might take a while due to conflicting obligations in other projects and, well, the day-time-job.
      Last edited by daniel klein; 30 Apr 2021, 00:37.

      Comment


      • #18
        Originally posted by daniel klein View Post
        Despite the lack of a fully reproducible (minimal) example, I have had a chance to look into this for a couple of minutes. I have identified at least one problem that causes failure for conditionals larger than 9, i.e., conditionals with two or more digits. The problem is with the Python code; I will get in contact with Joe about this issue.

        Concerning Linux vs, Mac OS: do you have (the same) Python installed on both? If you do not have Python on the Mac OS, then tuples will default to the nopython method, which should work fine. This is also the short-term workaround: use the nopython option. A long-term fix is coming but it might take a while due to conflicting obligations in other projects and, well, the day-time-job.
        In my Mac OS, I have python 3.9, while in my linux server, I have python 3.6.
        I am trying to upgrade the python at the linux server to check whether it can solve the problem.

        Comment


        • #19
          We have fixed the problem with conditionals larger than 9 in the Python code. Also, the lmacname()option may now be used with Python-based methods; the option remains undocumented. Thanks to Kit Baum, the updated version of tuples is now available from the SSC.

          Comment


          • #20
            Originally posted by daniel klein View Post
            We have fixed the problem with conditionals larger than 9 in the Python code. Also, the lmacname()option may now be used with Python-based methods; the option remains undocumented. Thanks to Kit Baum, the updated version of tuples is now available from the SSC.
            Thanks so much for your notice!

            Comment

            Working...
            X