I have a submit.html file that prints calculations done in a file called Observation.pm. Observation.pm exists in the folder called project. However, when the script runs, these error are printed:
Error during compilation of submit.html:Attempt to reload project/Observation.pm aborted.Compilation failed in require at submit.html line 67.
Line 67 in submit.html is:
use project::Observation.pm;
For some reason, it cannot find the Observation.pm file.
I have tried deleting and adding the Observation.pm file again. I've also tried using
use lib /path/name/to/project/;
in submit.html.
Any ideas on why this is happening or how to fix it? Let me know if I left out some vital info of the problem, wasn't sure what was relevant.
Try to use: Observation::Attempt instead of Atempt and also use path to the .pm file
When you use project::Observation;, Perl looks in #INC directories, if it finds an appropriate module.
In your case (use lib '/path/name/to/project';), this means it looks for a module named /path/name/to/project/project/Observation.pm.
Note the double .../project/project/.... So the correct search path must include /path/name/to instead, e.g.
use lib /path/name/to;
or if you want/need to keep use lib '/path/name/to/project';, say
use Observation;
instead.
Also note #ChrisTurner's comment, don't add the .pm extension.
Related
I have a solution full of SSIS projects, and I'm trying to build a single one via command line. I know I need to use the devenv.com executable, and if I use devenv.com solution.sln /Rebuild it will process the whole set of projects. However, I cannot seem to get the additional parameters correct. When I try devenv.com solution.sln /Rebuild "Development" /Project "projname", I get an enigmatic The operation could not be completed. The parameter is incorrect. Which parameter? What should it be? I've tried replicating this answer's syntax, but I get the same error. How do I find out what parameter is incorrect? So far the closest I can get is to rename the .sln file so it can't be found and just specify the .dtproj file.
I'm trying to eliminate the console warnings (of deprecation) from the iron-flex-layout element.
When I load my app, I get the following errors in the console:
iron-shadow-flex-layout.html:12 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-shadow-flex-layout.html:12
iron-flex-layout.html:14 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-flex-layout.html:14
iron-fit-behavior.html:221 /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
When I inspect the file paths, I see the following:
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-flex-layout.html
http://localhost:8080/bower_components/iron-fit-behavior/iron-fit-behavior.html
I am reluctant to go tinkering around and manually deleting files in my bower_components directory.
So, how can I fix these errors? What is the recommended best practice?
Edit
Here is the deprecated file on Github. Line 14 writes the console warning. But this deprecated file is not being imported anywhere in the app. (I know because I did a global search on the string iron-flex-layout/classes and, separately, on iron-shadow-flex-layout.html). Instead, I have done as the warning suggests; I imported iron-flex-layout/iron-flex-layout-classes.html everywhere instead. But the warning persists nevertheless.
I assume the element owners and Google overlords want to retain the console warnings in place (and not accept a PR which removes it). So, what is the best practice? Live with the warnings? (It doesn't seem quite right to edit my local copy and just comment out the warnings.) Or should I do something else? (Maybe there is another option I'm not aware of.)
Edit2
per #tony19:
I recommend setting a breakpoint in the deprecated file (on the console.log() line) to see who's importing it. – tony19
So now, I'm using this:
https://github.com/PolymerElements/iron-flex-layout/blob/master/classes/iron-flex-layout.html
<script>
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
debugger;
</script>
I'm seeing some information appear when the app reaches the breakpoint. But nothing so far indicates what's causing the import of the iron-flex-layout element. Or what to do to fix it.
Is there a command or something that can log what file imported another file? I've looked all over for how I might accomplish that. Could anyone please describe in detail what that might look like?
The warning indicates that an HTML file in your source or dependencies is importing ../iron-flex-layout/classes/iron-flex-layout.html, which is deprecated. The import must be in your tree somewhere, or else the warning wouldn't appear. I recommend setting a breakpoint on the console.log() line of the deprecated file to track down the offender.
If you're in control of the offending element that imports this deprecated file, you can update the import to use iron-flex-layout-classes.html that the warning recommends. Otherwise, you can petition the maintainer of the offending element to update their dependencies (or submit a PR ;).
I had this same issue today and thought the same thing. However, diving a bit deeper I found a few third party components were using paper-styles/paper-styles which called in iron-flex-layout/classes/iron-flex-layout.html. The reference it'd be there somewhere I'm certain. Hope that helps.
Can anyone tell me what would be the cause of the error
/mysql_com.h:306:5: error: token # is not valid in preprocessor expressions
while this mysql_com.h file does not contain any #. So how can I fix this error.
I think it's similar to the error when we open windows edited file in linux, then at that time ^V appers. But in this case # is not anywhere in the file.
Thanks in advance. Looking for your kind response.
Looks like this sort of problem has been reported when a '.h.in' file is included at some point, instead of the usual '.h' header file (eg. this) - perhaps because of some missing files or misconfigured include paths?
As has been previously suggested, I'd try tracing things back through the definition of MYSQL_VERSION_ID and double check that the correct .h files and include paths are present on your machine.
You have to check what is stored in MYSQL_VERSION_ID. Go to the library file, where this constant defined having the syntax like below :-
#define MYSQL_VERSION_ID BLAH-BLAH
Try to resolve this BLAH-BLAH, because this definitely have some problem, that have "#" symbol.
I want to use the cuPrintf function, and I get it from SDK. In the readme file they write the following
Use The cuPrintf package consists of two device functions (i.e. called
from within a CUDA kernel) and three host functions (i.e. called from
within the host application). These are packaged in a single
cuPrintf.cu file, along with declarations included in a separate
cuPrintf.cuh header file. To use cuPrintf in your application, you
must do one of the following:
a) Either: Include the header-file cuPrintf.cuh at the top of your
device code, and add cuPrintf.cu to your makefile or build
command-line so that the file is included in your program.
b) Or: Directly “#include cuPrintf.cu” at the top of your device
code. In this case you should not add this file to your
makefile/build-command, and you should take care to only include it
once in your entire project.
I tried some ways but all of them give me error, ( fatal error C1083: Cannot open include file: 'cuPrintf.cuh': No such file or directory )
I put the 'cuPrintf.cu' in the header folder in the VB 2008, and
include but give me error, and change it to
cuPrintf.cuh but also don't work.
I put both files in the extension of the project , and include them
in the code , and also give me error.
Any suggestions about how to fix it, I need this function for my code.
I solved my error , by this way :
put both files ".cu & .cuh" in the same path of the project , and include "cuPrintf.cu" in the top of the code and delete the .cu file from the header
Hope this will help who face the same error
I am writing a WIX installer and I have a following requirement:
During installation, I need to pass an absolute path to a file (lets call it A) included in my installer to a COM component, which already exists on the hard drive and is a part of another program. I have already written an appropriate Custom Action which expects a path to the file A. I don't want to include A as a file installed in the Program Files folder and removed during the uninstallation process. Instead, I would like to put A only temporary on the hard drive, call my Custom Action which will cause the COM component to use the content of A, and then remove A from disk. Is there an easy way to accomplish this goal?
I have tried to utilize the Binary Table and store A there, however I don't know how to reference A using absolute path. I know I could put A outside of MSI file but I would like to keep every file installer needs in a single MSI.
Any help would be appreciated.
Deleting a file that MSI installed means that MSI will consider it "broken" and try to auto-repair it if called on to do so. That happens automatically in several cases (e.g., advertised shortcuts and COM registration) so I'd recommend against it. Leave the file there instead -- it's done its job and there's no harm in leaving it there.
I would take this approach.
Install the file "A" into any directory. Run your custom action needed to update the COM component. Then run another custom action or modify the currently written one to remove the file after it is no longer in use. This would leave no trace of the file "A" and if you schedule the custom action to only run during the install you won't have to worry about it on uninstall.