NYUCCL / psiTurk

An open platform for science on Amazon Mechanical Turk.
https://psiturk.org
MIT License
277 stars 140 forks source link

Hit creation fails: Exception: __init__() takes exactly 1 argument (2 given) #485

Closed Sumith1896 closed 3 years ago

Sumith1896 commented 3 years ago

Debug mode is working fine but when I try to launch HITs, I get the following error:

[psiTurk server:on mode:sdbx #HITs:0]$ hit create 
number of participants? 1
reward per HIT? 1.00
duration of hit (in hours, it can be decimals)? 10
*****************************
    Max workers: 1
    Reward: $1.00
    Duration: 10.0 hours
    Fee: $0.20
    ________________________
    Total: $1.20
Create sandbox HIT [y/n]? y
Error during hit creation.
Response(Operation: create_hit | Status: error | Exception: __init__() takes exactly 1 argument (2 given))

I have narrowed it down to the following line (300) in psiturk_shell.py:

            create_hit_response = self.amt_services_wrapper.create_hit(num_workers=numWorkers, reward=reward,
                                                                       duration=duration)

            if create_hit_response.status != 'success':
                self.poutput('Error during hit creation.')
                print(create_hit_response)
                return
            else:
                self.maybe_update_hit_tally()

Psiturk version: 2.3.6 (also tried with 2.3.11 and 3.x.x) Python version: 2.7.17 (also tried with 3.6 and 3.7)

I remember having psiturk working with similar configurations in past, any inputs will be really helpful! Thanks!

deargle commented 3 years ago

Upgrade to psiturk 2.3.12 and remove all comments from your ad.html, see google group for a longer thread

On Fri, Mar 26, 2021, 1:23 PM Sumith Kulal @.***> wrote:

Debug mode is working fine but when I try to launch HITs, I get the following error:

[��psiTurk�� server:��on�� mode:��sdbx�� #HITs:0]$ hit create

number of participants? 1

reward per HIT? 1.00

duration of hit (in hours, it can be decimals)? 10


Max workers: 1

Reward: $1.00

Duration: 10.0 hours

Fee: $0.20

________________________

Total: $1.20

Create sandbox HIT [y/n]? y

Error during hit creation.

Response(Operation: create_hit | Status: error | Exception: init() takes exactly 1 argument (2 given))

I have narrowed it down to the following line (300) in psiturk_shell.py:

        create_hit_response = self.amt_services_wrapper.create_hit(num_workers=numWorkers, reward=reward,

                                                                   duration=duration)

        if create_hit_response.status != 'success':

            self.poutput('Error during hit creation.')

            print(create_hit_response)

            return

        else:

            self.maybe_update_hit_tally()

Psiturk version: 2.3.6 (also tried with 2.3.11 and 3.x.x) Python version: 2.7.17 (also tried with 3.6 and 3.7)

I remember having psiturk working with similar configurations in past, any inputs will be really helpful! Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6Y7MEDG3FATRZK3WYJR3TFTNMXANCNFSM4Z36XM5Q .

Sumith1896 commented 3 years ago

Thanks @deargle! Issue fixed!

kjaeschwartz commented 3 years ago

how do i upgrade to version 2.3.12? I dont wanna do the whole complex process of upgrading to version 3, i just want to be able to run my experiment.

deargle commented 3 years ago

pip install --upgrade psiturk==2.3.12

On Thu, Apr 8, 2021, 11:43 AM kjaeschwartz @.***> wrote:

how do i upgrade to version 2.3.12? I dont wanna do the whole complex process of upgrading to version 3, i just want to be able to run my experiment.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NYUCCL/psiTurk/issues/485#issuecomment-816015340, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6Y7PV3JAKBK4WJNPFTWTTHXTNDANCNFSM4Z36XM5Q .