Forums

'pbkdf2_hmac' error on Python 2.7.6

I've just upgraded web2py to 2.18.4 and auth is throwing: -

<type 'exceptions.AttributeError'> 'module' object has no attribute 'pbkdf2_hmac'

...which I understand is because PythonAnywhere are using Python 2.7.6, but "pbkdf2_hmac" was introduced in 2.7.8.

Absent a fix from the web2py end, is there anything I can do to resolve this, given that I'm not expecting you to do a point release Python upgrade just for me....

Cheers,

PhilK

We actually can do a point release Python upgrade for you :-)

The versions of Python that you have installed depends on the system image associated with your account; you're on our older "classic" system image, and the new "earlgrey" image has Python 2.7.12. We can easily switch your account over to "earlgrey" -- it's just a simple database change on our side.

But there is one catch; the versions of many other things will be upgraded at the same time. Many of the pre-installed Python modules will be upgraded, which means that any code you have that depends on the older versions of the pre-installed modules may break if it's not compatible with any API changes.

There's also a slightly more subtle issue if you're using virtualenvs -- virtualenvs can have issues with point release upgrades, so ones that were built for (eg) Python 2.7.6 are not always compatible with 2.7.12 -- so you might need to re-create any virtualenvs.

Anyway, we can certainly switch you over to the "earlgrey" image if you like -- just let us know.

Got it, great - please switch me over. Happy to address any issues on my side!

No problem. That's done.

I am also getting the same error (AttributeError) 'module' object has no attribute 'pbkdf2_hmac'

Can you pl switch my account to "earlgrey"

thanks and regards

santhosh

sure, we've switched you over! you will have to restart any consoles and reload your webapp etc.

Thank you very much. I have been able login successfully. :-)

Excellent, thanks for confirming!

Same for me. Could you please switch my account, too. Thanks! Best regards Clemens

Please confirm that you have read and understand the warning that was posted by giles in the second post in this thread.

The risk are understood. And there is no alternative since no login isn't a solution. Thus could you please switch the account. Thanks! Best regards Clemens

No problem. That's done.

Could you also upgrade me the same? I understand the warnings :)

No problem. I have updated your account.

Thanks Glenn

Could you also upgrade me the same? I understand the warnings :)

No problem - that's done now. Any new consoles you start will have the new system image; websites, scheduled tasks, and always-on tasks will pick it up the next time they're restarted.

Thanks a lot

No problem!

Me too :) I understand the risks - can't register users without the upgrade.

sure, we've switched you over! you will have to restart any consoles and reload your webapp etc.

I am also getting the same error (AttributeError) 'module' object has no attribute 'pbkdf2_hmac'

Can you pl switch my account to "earlgrey"

thanks and regards

It looks like your account is already on earlgrey -- do you see a link for Python 3.7 on the "Consoles" page?

I have also the same problem. I understand the risks - can't register users without the upgrade.

No problem. I have updated your account.

I'm having the same problem also: (AttributeError) 'module' object has no attribute 'pbkdf2_hmac'. I understand the risks as stated above by Giles. Can you switch me over to the Python 2.7.12 image also?

No problem. I have updated your account.

Im new, just my first install, can you upgrade me? thx!

Hi there, you are already on the latest PythonAnywhere system image. You can see which image you are on, and what libraries you have here. And if you want to install any python libraries on top of that, see this.

Thx, but why am i still getting this error? How can I fix it and 'start server' on Web2Py?

Thx, but why am i still getting this error? How can I fix it and 'start server' on Web2Py?

Did you start a new console? Have you reloaded your web app?

I have two consoles. The original Hello World and my first test console. My test console was created before I tried to install Web2Py.

Does reload mean hit the reload button on my config page? I just did that. Still the same error. FYI, I'm both an PythonAnywhere and Web2Py newbie. Im trying to 'start server' to open Web2Py.

You do not run web apps in the console on the PythonAnywhere. What error do you see in your logs? (there are links to logs on your web configuration page)

I’ll check. Will web2py errors show in anywhere logs? Any hints on what to look for? Shall I send a file?

There’s some kind of compalibilty prob here I think. I checked the Anywhere error.log. No errors. I’ve been searching web2py forums. Still trying to figure it out. Btw, I started w PyCharm.

The error I get in iOS is the one for this thread about 'pbkdf2_hmac'.

I get it when I try to start server on my initial instal of Web2Py. Thx.

Im dead in the water here. Can someone help me?

I turned off my web app. And restarted. Not fixed.

Is web2py incompatible now?

Where were you seeing the error message? You mention iOS, which is confusing me a little.

I meant OSX, sorry. So I install web2py on my MacbookPro, then I get the start server screen where I can set some things like password, port etc. I click the ‘start server’ button and get the error.

Ah, so this is for something you're running on your own machine. We can't really give detailed tech support for problems that aren't related to our own service -- but I do know that when people had that error when they were running web2py on our system in the past, it was because they had an old version of Python 2.7 -- I think it was 2.7.5 -- and the issue was resolved when we upgraded their accounts so that they had 2.7.12. So if you upgrade the version of Python on your own machine, it may well fix the problem for you.

Hi, Can you switch my account to "earlgrey" too? Having the same issues described above. Thanks!

No problem. I have updated you system image.

Hi, Can you switch my account to "earlgrey" too? Thanks

Sure, @claxroom, we've switched you over to our most recent system image.

Thanks lightning-fast!

No problem, glad we could help!

Hi, can you switch my account to "earlgrey" too? Thanks!

Sure, @fabioceccarani -- since this is an old thread, the most recent system image is now fishnchips, not earlgrey (and we're working on introducing a new one). So I'm switching you to "fishnchips".

Thanks!

Just a note to say that you no longer need to ask to have your system image changed -- you can change it yourself from the "Account" page. There's more information on this help page.

I get the message 'module' object has no attribute 'pbkdf2_hmac'.

The note:

"Just a hint that you don't need to ask to change your system image anymore - you can change it yourself on the Account page. More information is available on this help page."

does not work for me ; please set my system to the previous state.

what do you mean by "does not work for me" and "previous state"?