Can some one help me in this issue. I have written a script to check performance and it 7s working file in my local vscode. But I ran a package( python-m which is created a from my a wheel file getting module and config file(.yaml) not found.
Actually my cript structure I followed structure as below
myscript
My project
init.py
__ main__.py(importing fuc1 and fuc2 causing error
func1.py
func2.py
Importconfig.yaml
Requirements.txt
When ever I'm running main file needs load config file, py files. Then it needs to run to check the performance
Related
I tried to import a module from my private repository (GitHub). Following the Deno documentation, I put DENO_AUTH_TOKENS env with my dev key xxxxxx#raw.githubusercontent.com.
I can load the main file module on my repo but all relative paths from this module fail to download (404, path is correct just not authorized I suppose).
Do you know how to fix load relative file from a module in a private repository?
I ran my process with the debug mode:
deno run -L debug main.ts
Output:
DEBUG RS - deno::auth_tokens:69 - Parsed 1 auth token(s).
so my auth is correctly parsed and I can load the first file but all relative files can't be loaded.
----- Edit
Ok my bad, i wanted to use my node module to deno but i forgot to rename all import with .ts at the end... i'm so stupid, sorry ;) .
I've imported a module called "github.com/lib/pq". before I ran my code, I inserted this in the terminal % go get github.com/lib/pq. Then when i tried to run my code, I'm getting an error message in the terminal
'no required module provides package github.com/lib/pq: go.mod file not found in current directory or any parent directory; see 'go help modules'
Running go mod tidy will sync your go.mod and go.sum file with the imports in your code, this will add missing dependencies and remove unnecessary ones. Should solve your issue.
I ran Robot framework test cases(present in github) through azure pipeline. Test cases executed fine. Next I modified robot framework test case file to import yaml variable file (variable yaml file also present in same github repo folder) which has variables to be used by test cases file.
yaml variable file looks like this
login:
url: xxx.com
email: abc#y.com
password: xyz
And my test cases file look like this
*** Settings ***
Library SeleniumLibrary
Variables variablesfile.yaml
*** Test Cases ***
Dev_TC01_AddProcess
Open Browser ${login.url} chrome
Input Text id=email ${login.email}
Input Password id=password ${login.password}
And my yaml pipeline to trigger test scenarios looks like this
- script: |
pip install pytest pytest-azurepipelines
pytest
robot --pythonpath . -x outputxunit.xml TestScenarios.robot
displayName: 'Run Robot Scripts'
but on running the pipeline I get error, because test scenarios file is unable to reference variablesfile.yaml. got error message - Resolving variable '${login.url}' failed:
Can you please suggest how to reference variable file
Above error seems to be caused by the variables yaml file not being found.
If you defined Variables file in the Settings section like what you defined in above example. You should put the variables yaml files in the same directory of the test robot file TestScenarios.robot.
If the variables files are not under the same directory. You can define the correct relative path in the Settings section like below example: See here.
Variables ../data/variables.yaml
Note:
Using YAML files with Robot Framework requires PyYAML module to be installed. If you have pip_ installed, you can install it simply by running pip install pyyaml.
Variables file is in the same directory of TestScenarios.robot. I also tried entering the full path still it didnt work. Finally i got a solution, I need to run pip install pyyaml script then it worked
I'm using Adafruit_DHT library in a file and when I try to use pyinstaller to compile, I get an error that Raspberry_Pi_Driver.so: cannot open shared object file
I'm using normal RPi (not model 2) and raspbian. The file that I'm trying to compile works by itself fine. The Raspberry_Pi_Driver.so is there I did find ./ | grep Raspberry_Pi_Driver.so and it existed. I tried also to use the --hidden-import=Adafruit_DHT when compiling the pyinsatller and that did not work too. When compiling it does not give any error.
I noticed after compilation and in the build folder thee is an Adafruit_DHT folder that has the driver and etc.
Any idea what's going on? Could it be that the library has been recreated under build folder and this is confusing when executing the file?
I found a resolution for this (thanks to: k4ml.me/posts/pyinstaller.html) I just added '-p /path/to/mylib' when creating the exe file and mylib was the directory that Adafruit_DHT folder was (that Adafruit_DHT_Driver.so file was there).
I want to make a CPAN repository from all curently installed modules. So I used autobundle to get a list of installed modules.
I then used BackPAN::Index to download all the distributions into a directory and then ran dpan in it.
It chew them for quite some time and then failed
MyCPAN::App::DPAN::Indexer 1.28
Processing 2 distributions
One * = 1 distribution
# Extracting with ->_untar_at
# Extraction succeeded
+# Extracting with ->_untar_at
# Extraction succeeded
++
/home/ec2-user/dpan_test/modules/02packages.details.txt.gz-8496-trial has a problem and I have to abort:
Deleting file (unless you're debugging)
Some distributions in the repository do not show up in the file
/home/ec2-user/dpan_test/Moose-1.24.tar.gz
/home/ec2-user/dpan_test/Moose-Autobox-0.11.tar.gz at /usr/local/share/perl5/MyCPAN/App/DPAN/Reporter/Minimal.pm line 439
Some distributions in the repository do not show up in the file
and list of every distribution follows.
OTOH I have a success logged for every file in the indexer_reports.
Output from perl -V on this Pastie link
I suffered the same error it was resolved when I added:
organize_dists 1
Though when trying attempting to install from the mirror CPAN fails as no 01mailrc.txt.gz file can be found. This can be overcome by copying the file from say http://www.perl.org/CPAN/authors/01mailrc.txt.gz into the new mirror's authors directory
I got the same error message, but could fix it:
In my case, I put the tgz file directly in the root of my dpan directory. Moving "./dpan/DateTime-0.70.tar.gz" to "./dpan/authors/id/D/DR/DROLSKY/DateTime-0.70.tar.gz" did fix the problem. Now "02packages.details.txt.gz" and "03modlist.data.gz" get created.