• oakandsage

    So I've been looking into this, and I've hit a snag. I can't tell whether or not it's insurmountable.

    The discord.py library depends on websockets.
    Websockets won't install via python 2, so StaSh doesn't install it properly. You can , in theory, run setup.py manually. But when I look at the websockets setup.py file, I see this in the setuptools call:

    ext_modules = [
            optional=not os.path.exists(os.path.join(root_dir, '.cibuildwheel')),

    Now, to me it looks like this is an optional extension in C, but I'm not sure whether websockets is ever going to install correctly. I don't have any experience with setuptools, so I don't know how SOL Pythonista's going to be when it hits that.

    I also can't figure out how to run setup.py (I just get a whole bunch of permission errors), so I haven't been able to verify whether or not it's possible to use websockets. It's even possible that websockets is actually installed properly (despite the issue report that says it can't be installed with pip install if pip is using python 2.x) and the issue with the failed coroutine detection is something else entirely.

    Regardless, it looks like it would be a challenge to do anything meaningful with the Discord API using discord.py in Pythonista.

    posted in Pythonista read more
  • oakandsage

    Hmm I should also comment that I'm having to run synchronator repeatedly. I keep getting a LookupError('malformed_path', None). It appears to be related to the fact that the dropbox contains filenames starting with '.' (uploaded by DropboxSync) that Synchronator doesn't consider valid to sync (based on the valid_filename_for_upload function).

    I think that my sync may be completely fubar'd due to the remnants left over from DropboxSync, but I'm afraid if I empty out the app folder and resync, it's probably going to try to empty and delete the site-packages folder.

    EDIT: I ended up deleting the old app and creating a new one, and clearing out all the state files and token. Hopefully that'll resolve the issues with existing files from DropboxSync and previously-crashed Synchronator instances.

    posted in Pythonista read more
  • oakandsage

    This thread was very helpful to me with resolving the issue with the outdated version of the Requests module. Thanks.

    Now that the Synchronator script is running, I am wondering: Is there an ignore list? I would prefer not be syncing site-packages.

    posted in Pythonista read more
  • oakandsage

    Oh! Thank you -- I had assumed the in app documentation was accessing either the website or a cached copy of it! But I see now it is more complete.

    posted in Pythonista read more
  • oakandsage

    In case anybody else is dredging the forums trying to figure out how the sound module works, sound.play_effect() actually takes up to 5 parameters. The last one makes it repeat:

     effect = sound.play_effect('my_sound.wav', volume, pitch, unknown, repeat)

    If repeat is anything that evaluates to True, the sound seems to repeat until you call sound.stop_effect(effect).

    I have no idea what the unknown parameter does.

    posted in Pythonista read more
  • oakandsage

    Hi - I'm wondering how you knew about sound.Recorder. I'm looking at the documentation at


    which doesn't mention it at all. (I also noticed that sound.play_effect accepts two additional undocumented arguments. I haven't figured out what the fourth does; the fifth appears to cause the sound to loop until stopped if it's anything other than 0.)

    Is there additional documentation or a forum post describing sound.Recorder that I'm missing?


    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!