I am using symfony 2 and I have a working webpage on my computer. The problem is that when I upload it to the production server I receive the following error:
ErrorException: Warning: DOMDocument::schemaValidateSource() [domdocument.schemavalidatesource]: Invalid Schema in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php line 363
in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php line 67
at ErrorHandler->handle()
at DOMDocument->schemaValidateSource() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php line 363
at XmlFileLoader->validateSchema() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php line 293
at XmlFileLoader->validate() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php line 222
at XmlFileLoader->parseFile() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php line 40
at XmlFileLoader->load() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php line 43
at FrameworkExtension->load() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php line 42
at MergeExtensionConfigurationPass->process() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php line 39
at MergeExtensionConfigurationPass->process() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php line 119
at Compiler->compile() in /home/ljrgwoej/public_html/webs/Chambalo/vendor/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php line 437
at ContainerBuilder->compile() in /home/ljrgwoej/public_html/webs/Chambalo/app/bootstrap.php.cache line 872
at Kernel->buildContainer() in /home/ljrgwoej/public_html/webs/Chambalo/app/bootstrap.php.cache line 783
at Kernel->initializeContainer() in /home/ljrgwoej/public_html/webs/Chambalo/app/bootstrap.php.cache line 517
at Kernel->boot() in /home/ljrgwoej/public_html/webs/Chambalo/app/bootstrap.php.cache line 548
at Kernel->handle() in /home/ljrgwoej/public_html/webs/Chambalo/web/app.php line 12
what could I do? i have google a lot with no results. Thanks
I got this after I did an update. I fixed this by downgrading my version of libxml from libxml2-2.6.26-2.1.21.el5_9.2 to libxml2-2.6.26-2.1.21.el5_9.1.
yum downgrade libxml2-2.6.26-2.1.21.el5_9.1
Related
I am just a beginner in NLP and was trying to learn the Semantic role labeling concept through implementation.
I was trying to load the bert-base-srl model from the public storage of allennlp.
But was facing the following error:
from allennlp.predictors.predictor import Predictor
predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/bert-base-srl-2020.03.24.tar.gz")
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11672/96061884.py in <module>
1 from allennlp.predictors.predictor import Predictor
----> 2 predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/bert-base-srl-2020.03.24.tar.gz")
~\anaconda3\lib\site-packages\allennlp\predictors\predictor.py in from_path(cls, archive_path, predictor_name, cuda_device, dataset_reader_to_load, frozen, import_plugins, overrides, **kwargs)
364 plugins.import_plugins()
365 return Predictor.from_archive(
--> 366 load_archive(archive_path, cuda_device=cuda_device, overrides=overrides),
367 predictor_name,
368 dataset_reader_to_load=dataset_reader_to_load,
~\anaconda3\lib\site-packages\allennlp\models\archival.py in load_archive(archive_file, cuda_device, overrides, weights_file)
233 config.duplicate(), serialization_dir
234 )
--> 235 model = _load_model(config.duplicate(), weights_path, serialization_dir, cuda_device)
236
237 # Load meta.
~\anaconda3\lib\site-packages\allennlp\models\archival.py in _load_model(config, weights_path, serialization_dir, cuda_device)
277
278 def _load_model(config, weights_path, serialization_dir, cuda_device):
--> 279 return Model.load(
280 config,
281 weights_file=weights_path,
~\anaconda3\lib\site-packages\allennlp\models\model.py in load(cls, config, serialization_dir, weights_file, cuda_device)
436 # get_model_class method, that recurses whenever it finds a from_archive model type.
437 model_class = Model
--> 438 return model_class._load(config, serialization_dir, weights_file, cuda_device)
439
440 def extend_embedder_vocab(self, embedding_sources_mapping: Dict[str, str] = None) -> None:
~\anaconda3\lib\site-packages\allennlp\models\model.py in _load(cls, config, serialization_dir, weights_file, cuda_device)
378
379 if unexpected_keys or missing_keys:
--> 380 raise RuntimeError(
381 f"Error loading state dict for {model.__class__.__name__}\n\t"
382 f"Missing keys: {missing_keys}\n\t"
RuntimeError: Error loading state dict for SrlBert
Missing keys: ['bert_model.embeddings.position_ids']
Unexpected keys: []
Does someone know a fix for this?
If you are on the later versions of allennlp-models, you can use this archive_file instead: https://storage.googleapis.com/allennlp-public-models/structured-prediction-srl-bert.2020.12.15.tar.gz.
The latest versions of the model archive files can be found on the demo page in the Model Card tab: https://demo.allennlp.org/semantic-role-labeling
Im trying to integrate DAX with Pynamodb(working on an existing pull request). While testing the batch write method from aws DAX sdk I'm facing the below issue. Any help is appreciated.
/.virtualenvs/PynamoDB/lib/python2.7/site-packages/amazondax/DaxClient.pyc in batch_write_item(self, **kwargs)
98 Stubs.write_batchWriteItem_116217951_1(request, tube)
99
--> 100 result = self._decode_result('BatchWriteItem', request, Assemblers.batchWriteItem_116217951_1, tube)
101 result = self._resolve_attribute_values(result, tube)
102 return result
/.virtualenvs/PynamoDB/lib/python2.7/site-packages/amazondax/DaxClient.pyc in _decode_result(self, operation_name, request, assembler, tube)
223 if status == DaxClient.SUCCESS:
224 tube.skip() # Throw away the empty error header
--> 225 return assembler(request, tube)
226 else:
227 return self._handle_error(operation_name, tube)
/.virtualenvs/PynamoDB/lib/python2.7/site-packages/amazondax/Assemblers.pyc in batchWriteItem_116217951_1(request, tube)
115
116 for _ in range(num_items, 0, -2):
--> 117 key = AttributeValueDecoder._decode_key_bytes(_dec, key_schema)
118 if _dec.try_decode_null():
119 # DeleteRequest
UnboundLocalError: local variable 'key_schema' referenced before assignment
This is a known issue that I hope to have a fix out for shortly.
This is fixed in version 1.0.4 of the DAX Python client.
Previously %R and %%R magics were working in IPython and Jupyter python notebooks.
The R terminal version is:
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
After upgrading to Version 1.7.4.3348 in Enthought Canopy, the notebooks and IPython no longer work. I have tried reinstalling following Installing RKernel and http://irkernel.github.io/installation/, which worked before. I run the command to load the R-extension as per
%load_ext rpy2.ipython
I get the error message as follows:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-691c6d73b073> in <module>()
----> 1 get_ipython().magic(u'load_ext rpy2.ipython')
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2161 magic_name, _, magic_arg_s = arg_s.partition(' ')
2162 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2163 return self.run_line_magic(magic_name, magic_arg_s)
2164
2165 #-------------------------------------------------------------------------
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2082 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2083 with self.builtin_trap:
-> 2084 result = fn(*args,**kwargs)
2085 return result
2086
<decorator-gen-64> in load_ext(self, module_str)
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
64 if not module_str:
65 raise UsageError('Missing module name.')
---> 66 res = self.shell.extension_manager.load_extension(module_str)
67
68 if res == 'already loaded':
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self, module_str)
82 if module_str not in sys.modules:
83 with prepended_to_syspath(self.ipython_extension_dir):
---> 84 __import__(module_str)
85 mod = sys.modules[module_str]
86 if self._call_load_ipython_extension(mod):
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/ipython/__init__.py in <module>()
----> 1 from .rmagic import load_ipython_extension
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/ipython/rmagic.py in <module>()
57 template_converter = ro.conversion.converter
58 try:
---> 59 from rpy2.robjects import pandas2ri as baseconversion
60 template_converter = template_converter + baseconversion.converter
61 except ImportError:
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/robjects/pandas2ri.py in <module>()
7 INTSXP)
8
----> 9 from pandas.core.frame import DataFrame as PandasDataFrame
10 from pandas.core.series import Series as PandasSeries
11 from pandas.core.index import Index as PandasIndex
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/__init__.py in <module>()
20
21 # numpy compat
---> 22 from pandas.compat.numpy_compat import *
23
24 try:
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/compat/numpy_compat.py in <module>()
13
14 # numpy versioning
---> 15 _np_version = np.version.short_version
16 _np_version_under1p8 = LooseVersion(_np_version) < '1.8'
17 _np_version_under1p9 = LooseVersion(_np_version) < '1.9'
AttributeError: 'module' object has no attribute 'version'
Could it be related to Canopy version of numpy being listed as 1.10.4-1 and the np.version result being 1.11.1 (based on error message)? Any suggestions gratefully received. PS. R works in the console still, plus in terminal and in Jupyter with an R kernel...
The support crew at Enthought examined the version of numpy, then pandas. Reinstalling both did not solve the problem. The unexplained resolution occurred from the pip install theano --upgrade command on the Canopy Terminal. Logging this error as an unexplained issue with %R but with the strong indication that it is about dependency version.
I'm currently having issues trying to load rmagic into IPython since I upgraded to OSX Yosemite.
I'm using the following command:
%load_ext rmagic
Below is the error I'm getting, and I'm not sure if it's because I upgraded to Yosemite or because I'm trying to load R incorrectly. I've pasted all the Traceback in case that's useful, but the error ends in
ImportError: cannot import name conversion
My R version is 3.1.1
My Python version is 2.7.6
My IPython version is 2.3.0
Not sure what version rpy2 is, but I only downloaded it a few days ago so I assume it's the latest.
ImportError Traceback (most recent call last)
<ipython-input-7-691c6d73b073> in <module>()
----> 1 get_ipython().magic(u'load_ext rpy2.ipython')
/Library/Python/2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2203 magic_name, _, magic_arg_s = arg_s.partition(' ')
2204 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2205 return self.run_line_magic(magic_name, magic_arg_s)
2206
2207 #-------------------------------------------------------------------------
/Library/Python/2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2124 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2125 with self.builtin_trap:
-> 2126 result = fn(*args,**kwargs)
2127 return result
2128
/Library/Python/2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
/Library/Python/2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/Library/Python/2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
61 if not module_str:
62 raise UsageError('Missing module name.')
---> 63 res = self.shell.extension_manager.load_extension(module_str)
64
65 if res == 'already loaded':
/Library/Python/2.7/site-packages/IPython/core/extensions.pyc in load_extension(self, module_str)
96 if module_str not in sys.modules:
97 with prepended_to_syspath(self.ipython_extension_dir):
---> 98 __import__(module_str)
99 mod = sys.modules[module_str]
100 if self._call_load_ipython_extension(mod):
/Library/Python/2.7/site-packages/rpy2/ipython/__init__.py in <module>()
----> 1 from .rmagic import load_ipython_extension
/Library/Python/2.7/site-packages/rpy2/ipython/rmagic.py in <module>()
51
52 import rpy2.rinterface as ri
---> 53 import rpy2.robjects as ro
54 import rpy2.robjects.packages as rpacks
55
/Library/Python/2.7/site-packages/rpy2/robjects/__init__.py in <module>()
16 import rpy2.rlike.container as rlc
17
---> 18 from rpy2.robjects.robject import RObjectMixin, RObject
19 from rpy2.robjects.vectors import *
20 from rpy2.robjects.functions import Function, SignatureTranslatedFunction
/Library/Python/2.7/site-packages/rpy2/robjects/robject.py in <module>()
5 rpy2.rinterface.initr()
6
----> 7 from . import conversion
8
9 class RObjectMixin(object):
ImportError: cannot import name conversion
Minrk had it right - uninstalling and reinstalling rpy2 fixed my problem. Not sure why I didn't think of that before! Thanks.
I am setting up FOSCommentBundle, I followed all steps to install it however any page I access now, I am getting the exception below:
InactiveScopeException: You cannot create a service
("fos_comment.listener.thread_permalink") of an inactive scope ("request").
in C:\htdocs\click-na-ilha\app\cache\dev\appDevDebugProjectContainer.php line 1595
at appDevDebugProjectContainer->getFosComment_Listener_ThreadPermalinkService() in C:\htdocs\click-na-ilha\app\bootstrap.php.cache line 1904
at Container->get('fos_comment.listener.thread_permalink') in C:\htdocs\click-na-ilha\app\cache\dev\classes.php line 1772
at ContainerAwareEventDispatcher->lazyLoad('fos_comment.thread.create') in C:\htdocs\click-na-ilha\app\cache\dev\classes.php line 1737
at ContainerAwareEventDispatcher->getListeners(null) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 107
at TraceableEventDispatcher->getListeners() in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 168
at TraceableEventDispatcher->getNotCalledListeners() in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 354
at TraceableEventDispatcher->saveInfoInProfile(object(Profile), false) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 328
at TraceableEventDispatcher->updateProfiles('05b179', false) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 431
at TraceableEventDispatcher->postDispatch('kernel.terminate', object(PostResponseEvent)) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 148
at TraceableEventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in C:\htdocs\click-na-ilha\app\bootstrap.php.cache line 2758
at HttpKernel->terminate(object(Request), object(Response)) in C:\htdocs\click-na-ilha\app\bootstrap.php.cache line 2159
at Kernel->terminate(object(Request), object(Response)) in C:\htdocs\click-na-ilha\web\app_dev.php line 32
Here is the code I have added https://gist.github.com/dextervip/3d9efe24c7241a6eeda0
What's wrong?