• Python sys.argv 'Module' has no attribte

    From mobbyg@21:1/101 to All on Mon Mar 1 08:03:03 2021
    Hello all..

    I am working a python script and am running into a weird error..

    I am trying to pass an argument to a script I wrote, through the execute
    python menu command. the data field is just 'ccdash 1' with the number bing
    the code number to identify a crypto currency. 1=Bitcoin, 2=Litecoin, etc..

    When i run it from the menu, i get the error :
    AttributeError: 'module' object has no attribute 'argv'.

    Testing from my command line works fine, andthe call to the API returns the correct json data. But when I run it from a menu in Mystic,that is the error. Does anyone have insight into this?

    Thanks!
    73!
    Rich, KB2MOB

    |04---- |15Rich Lawrence, KB2MOB
    |14//// |15SysOp of Radio Freqs & Geeks BBS
    |01--v|10/// |07-Ham/Shortwav Radio, Tabletop Gaming and General Geekery- |11\\|02xx/ |08mobbyg@gmail.com

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From mobbyg@21:1/101 to All on Mon Mar 1 13:43:13 2021
    I found the fix!

    It was buried in the whatsnew.txt

    parama_str() will do the same as sys.argv. So I tried parama_str(1) and the argument passed in to the script and worked.

    73!
    Rich, KB2MOB

    |04---- |15Rich Lawrence, KB2MOB
    |14//// |15SysOp of Radio Freqs & Geeks BBS
    |01--v|10/// |07-Ham/Shortwav Radio, Tabletop Gaming and General Geekery- |11\\|02xx/ |08mobbyg@gmail.com

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)