agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq,
agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq ,
dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu
http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan
BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama
Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga
BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai
Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah
Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai
Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs
Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games
Comments
HI @sarah_alexandra ,
This line of code as such is valid. Can you post the exact error message (Traceback) from the console that you get when trying to run the code and the context of the code (i.e. is it part of an
inline_script
item)?— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thanks a lot for your fast reply! I already figured it out, the problem was a missing bracket in the code before.
Best,
Sarah
One additional question not directly relating to the above problem but I was hoping that you could help me with this:
I defined a list of dicts ("states") and a function ("determine_state"), the first containing all conditions for my experiment and the latter is intended to randomize the order of conditions.
Unfortunately, there seems to be an issue with the function or the index referring to the states in the dict [l] - I keep getting an error that "l" is either not defined or of "None Type". I was thinking that "l" might have to be defined before the function like a variable, but was not sure how to do so since it is not a normal variable.
Do you have any idea how I could solve this? My code is below, any tips highly appreciated :)
Hi Sarah,
You don't return anything. Can you try: `return I` in your function?
Eduard
simplified version of your function
Hi Eduard,
Thanks a lot for your fast help! I tried it out and it returns a "1" sometimes, but other times the following error occurs: "'int' object is not subscriptable"
Do you have any idea what the issue could be?
Thanks in advance!
Best,
Sarah
Could you provide the complete error message?
Now it seems to work, the error was the following:
Traceback (most recent call last):
File "<string>", line 62, in <module>
File "<string>", line 52, in determine_state
TypeError: 'int' object is not subscriptable
In the meantime, a different issue has come up - I defined a break rule for each of the conditions - when this break rule becomes true for one of the conditions, the condition should not be shown any more. To implement this, I defined two functions: (1) defining when the entire loop ends (all conditions are not active any more); (2) when one condition is not active any more because the break rule has been met for this condition. Unfortunately, the functions do not seem to work, since the loop goes on and violates the break rules I have defined (e.g. the safe amount of one condition becomes smaller than the lower lottery amount). Do you have an idea what the problem could be? Here is the relevant piece of code:
That part:
only changes the local variable state and returns a False. If you want to change the list states, you have to return a new list with the respective field modified. For example:
Does that work?
Hi Eduard,
Thanks for the recommendation! Unfortunately, it does not work yet. I was as well googling and thinking that it could have something to do with local vs. global variable. What does the phrase
exactly do?
And maybe for context, state refers to a single dict that is part of the following list of dicts:
Could this as well have to do with the way I am referring to the key "active"? Because in the rest of my code, I access my variables with states[l]["name_dict_key"].
Thank you so much in advance!
Have you stored the return value of that function in the variable states again? The objects
states
in the functionupdate_activity
andstates
in your main script are different things. Changing it in the function will have no effect on the object outside the function unless you overwrite it like this:states = update_activity(states)
If this is not it. You can try to find out whether changing the field worked, by printing out the list before and after the if statement (a.k.a. make sure your logic works).
Hi Eduard,
I tried this and unfortunately, it still does not work. I as well created a simplified example to check whether the function updates the "active" keys in the dicts, and it seems that this does not work out yet:
Simplified function + changing keys + printing:
So it seems like the step size has been changed and for the first dict the exit rule step_size < exit_rule is met, however "active" is still True. So it seems like the function is not correctly updating the "active" key, right?
That should be a single equal sign. Can you try fixing that?
Eduard
Yes this seems to work now, thank you so much!!
Hi Eduard,
I tested a lot over the day and there is unfortunately still an issue I am experiencing with this function
Unfortunately, it does only sometimes seem to update the value of the key "active" in the original dict / list, other times the original dict / list value for "active" is still "True", even though the function returns False.
I guess I was a little too fast earlier, could it be possible that the function still does not assign the value False globally to the dict / list?
Any ideas highly appreciated :)
Thank a lot and best wishes,
Sarah
Hi Sarah,
Unfortunately, it does only sometimes seem to update the value of the key "active" in the original dict / list, other times the original dict / list value for "active" is still "True", even though the function returns False.
That sounds as if it works inconsistently (sometimes it does, sometimes it doesnt). In such a case, the most probable case for the problem is that your logic doesn't work. So you need to find out how your variables interact and when exactly the if statement evaluates to true and when to false. Print statements can help with that procedure, also splitting up the long if statement into shorter ones.
The good news is though, that the experiment works in principle.
Let me know if you need more pointers on how to approach it.
Eduard
Hi Eduard,
Thank you so much for the reply - your suggestions are always so helpful! I figured out a workaround and now it seems to work :)
Best,
Sarah