how execute a Python Script with activeresource? - python

I need to execute this python script: http://superjared.com/static/code/googleMX.py
I installed pyactiveresource, but when I executed it: python googleMX.py I had this response.
Traceback (most recent call last):
File "googleMX.py", line 15, in ?
from pyactiveresource import ActiveResource
ImportError: cannot import name ActiveResource

by Responding myself...
It was using an older version of pyactiveresource. The author (Lucky) creates another one http://gist.github.com/330832

Related

Unable to import RocksDB module

I am fairly new to working with RocksDB. I have set up the environment for RocksDB following the link here, but when I run a sample Python script having import rocksdb it says:
Traceback (most recent call last):
File "`<string>`", line 1, in <module>
ModuleNotFoundError: No module named 'rocksdb'
Can anybody suggest a solution to this issue?

Python: Importing "Text" from typing package

I trying to import Textfrom typing by,
from typing import Text
I am getting the following error,
Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: cannot import name 'Text'
I am working on Python 3.5
Any advice?
This is a known problem with Python 3.5.0 and 3.5.1 - see https://github.com/python/mypy/issues/1838 and https://github.com/awslabs/aws-encryption-sdk-cli/issues/114.
As they say there, you can add try/catch blocks around the typing imports - or you can use an updated version of Python.

Python Cron Job Fails Because Modules Are not Found

I'm running a Python script on my server using a cron job:
/usr/bin/python/home/JohnDoe/scripts/Sample.py
I get an error saying
Traceback (most recent call last):
File "/home/JohnDoe/scripts/Sample.py", line 2, in <module>
import gspread
ImportError: No module named gspread\
Is there an easy way to run my third-party modules?

Using gspread python lib in python x,y

import gspread
rest of the code.
error :
Traceback (most recent call last):
File "C:\QSTK\Examples\MyCodes\gspread.py", line 1, in
import gspread
when i try to run the code in spyder i get this error.
the code works fine in python idle
Rename your script. You named it the same as a module you are trying to use, gspread, this causes a circular dependency.

Netbeans + sqlite3 = Fail?

I've decided to give Python a try on Netbeans. The problem so far is when try to run program I know works, i.e. if I ran it through the terminal. For the project I selected the correct Python version (2.6.5). And received the following error:
Traceback (most recent call last): File
"/Users/XXX/NetBeansProjects/NewPythonProject3/src/newpythonproject3.py",
line 4, in
import sqlite3 ImportError: No module named sqlite3
Search for PYTHONPATH. You probably have different settings in your OS and Netbeans.

Categories