• @mikael said:

    Could you try to strip down (a copy of) your code

    Of course, no problem. It might take me one or two days, because I have exams coming up

  • @stephen That’s how I understood him. And it worked out really well, after some minor adaptions

  • @Drizzel @omz's code is identical, excep that he specifies the argtypes on the playaudiosystemsound, which you should also do, otherwise you risk crashing (say on a 32 bit vs 64 bit device).
    I think ctypes defaults to 32 bit argtypes even on 64 bit devices, so you are safe in this case.

  • @Drizzel 10-4 rubber ducky 🧑🏻‍💻😉

  • @mikael All right, thank you

    No, you can't
    That would require adding a method to a built-in type and that's not possible (without going to the C source for Python):

    >>> str.clean=lambda self:'clean'+self Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: can't set attributes of built-in/extension type 'str'
  • @mikael I got a similar problem in a script where an ui.in_background def did a sql process and an in_main_thread def did another one...Threads were defined due to ui/modal problems

  • @Drizzel long piece of code but only small part added to the old one I wrote for your some time ago

    About my profile picture, I had modified it but I never seen it changed when I connect to the forum. That's why I didn't understand that you have seen it modified.

  • it works

  • @Drizzel The script is from Shaun-h, not mine. I only added some lines for your alert in the delete case.
    And the code is not sufficient so, you still have to add some lines for the real delete, when confirmed. Good work and good luck

  • @saraparker Yeah, I figured that out too. But if you check some other GPS-logging app like runtastic, they have the same issue

  • @mikael messages, as it doesn’t actually take too long and I don’t have to manage many small bits of data, making it easier for me (with limited python knowledge) to transfer multiple files.

  • @Drizzel it seems like Document.generate_pdf() uses subprocess to spawn a seperate process for generating the PDF. This is not allowed by iOS, thus the error.

  • Sorry for the late reply, your answer was exactly what I needed. I tried things like self.close() and self.hide(), but I just didn’t get to the self.view.close()

  • @Drizzel, some sites are use so much JS that they are hard to scrape with just requests and bs4. If this is the case here, you can use WebView to act as a browser and run the JS. I have a small helper class for this, discussed here.

    In all cases, web scraping seems to be a lot of detective work, trial and error.

  • One thing that can happen sometimes it's if you hit X right after running a script. Since numpy or matplotlib are very large, importing them takes some time. If you cancel before the import is complete, you get a partial import, which breaks later imports.

  • @JonB said:

    [1, 2, 3, 4]

    I had a similar problem so I change the a to a tuple and the copied it to b. I needed to pop() from b but keep a unchanged so I can reset it to b at start over in my script

    [1, 2, 3]

  • @donaldcassey yes it should work with soundcloud. I didn’t test it, but the module contains a file for extracting data from soundcloud. If you want to use this, just copy the code into a new directory and create a file called ‘songs.txt’ . Then paste every link into a new line in the text file. The code does not work if the file contains empty lines, but you can fix that with by replacing



    if not “\n” in song_url: dl.download([song_url])
Internal error.

Oops! Looks like something went wrong!