Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mETL tutorial example 18_new_transformation.yml not works #22

Open
ramonrxven opened this issue Aug 20, 2014 · 3 comments
Open

mETL tutorial example 18_new_transformation.yml not works #22

ramonrxven opened this issue Aug 20, 2014 · 3 comments

Comments

@ramonrxven
Copy link

Hi, I'm practicing with the examples of the tutorials, but the file 18_new_transformation.yml throws me the following error, thanks:
Traceback (most recent call last):
   File "/ usr / local / bin / metl", line 9, in
     load_entry_point ('Metl 1.0.1dev ==', 'console_scripts', 'metl') ()
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/script.py", line 101, in main
     source_resource = options.source
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 61, in init
     self.init ()
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 65, in init
     self.loadSource ()
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 155, in loadSource
     self.readers = [self.loadSourceObject (self.config.get ('source'), base = True)]
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 191, in loadSourceObject
     transforms = self.loadTransforms (fcfg.get ('transforms', []))
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 319, in loadTransforms
     transforms.append (self.getObject (ttype, transform_config))
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 214, in getObject
     obj = self.lookupClass (transformConfig [transformType.lower ()], transformType)
   File "/usr/local/lib/python2.7/dist-packages/mETL-1.0.1dev-py2.7.egg/metl/configparser.py", line 90, in lookupClass
     'Not found class:% s or% s'% (inner_path, name)
metl.exception.ClassNotFoundException: Not found class: metl.transform.formatphonenumbertransform.formatPhoneNumberTransform or formatPhoneNumber

@bfaludi
Copy link
Collaborator

bfaludi commented Aug 20, 2014

Did you check the run.sh file for the correct command? In that example you need to execute like this:

metl -p . [config.yaml]

-p parameter will add the given route to the path. This is necessary when you write your own scripts that are not installed packages.

@ramonrxven
Copy link
Author

i tried using -p parameter like the example in the run.sh, but throw the same error.

@bfaludi
Copy link
Collaborator

bfaludi commented Aug 21, 2014

The 18th example requires the phonenumbers package.

Please execute the following command:

python material/__init__.py

If you get an exception like this,

Traceback (most recent call last):
  File "material/__init__.py", line 2, in <module>
    import phonenumbers
ImportError: No module named phonenumbers

please install the package.

easy_install phonenumbers

After that it have to work.

(If you use the mETL's -d paramter you can get the same exception, but be careful because it will be multiple exceptions and hard to find)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants