barnumbirr / coinmarketcap

A python wrapper around the https://coinmarketcap.com API.
Apache License 2.0
437 stars 110 forks source link

AttributeError: module 'tensorflow' has no attribute 'Session' #57

Open Nish0106 opened 4 years ago

Nish0106 commented 4 years ago

HI, I am trying to train a NLP dataset using tensorflow But I am facing the below error

File "train.py", line 52, in with tf.Session() as sess: AttributeError: module 'tensorflow' has no attribute 'Session'

I am using tensorflow - 2.3.0, Python - 3.6.8

Please help!

alex-stout commented 4 years ago

Hi @Nish0106!

It looks like your question is related to Tensorflow not coinmarketcap itself.

Tensorflow 2.0 changed a lot in terms of usage compared to TF 1. Session is a v1 object. Here's a link to a Stack Overflow that might help you more: https://stackoverflow.com/questions/55142951/tensorflow-2-0-attributeerror-module-tensorflow-has-no-attribute-session